Skip to content

Instantly share code, notes, and snippets.

View ervinb's full-sized avatar

Ervin Barta ervinb

View GitHub Profile
##
# Exception:
# ThriftClient::NoServersAvailable:
# No live servers in [127.0.0.1:9160]
##
# install Cassandra Cluster Manager
$ sudo pip install ccm
# install Ruby driver
#!/bin/bash
regions=(local ca-central-1 eu-central-1 ap-southeast-1 ap-northeast-1 us-east-1)
image_name_base="cache-bench"
image_sizes_in_mb=(64 512 1024)
dockerfile="Dockerfile.sample"
log_file=docker-bench.log
#!/bin/bash
set -e
registry_version="2"
local_registry_port="5000"
local_registry_name="localhost"
local_registry_url="${local_registry_name}:${local_registry_port}"
docker_image_name="$SEMAPHORE_REPO_SLUG"
base_image_name="${local_registry_url}/${docker_image_name}"
@ervinb
ervinb / devops_best_practices.md
Created November 18, 2017 18:27 — forked from jpswade/devops_best_practices.md
Devops Best Practices

DevOps started out as "Agile Systems Administration". In 2008, Andrew Shafer did a talk called "Agile Infrastucture" addressing issues around involving more of the company in the same disciplines as programmers.

In 2009, Patrick Debois created "DevOpsDays" conference to help to bring it to light. However, it wouldn't begin to trend until about 2010, when people would begin to describe it as a standalone discipline.

Today, DevOps goes beyond just developers, systems administration and infrastructure, its about [dev, ops, agile, cloud, open source and business](https://blogs.the451group.com/opensource/2010/03/03/devops-mixing-dev-ops-agile-cloud-open-source-and-busi

#!/bin/bash
set -euo pipefail
changed_files=""
changed_directories=""
if [ "$BRANCH_NAME" = "master" ]; then
echo "On master. Nothing to do."

Migrate a Fedora 27 installation to a NVMe SSD drive with rsync

Prepare partitions

Create partitions with GParted:

Device Label File system Flag
/dev/nvme01p1 fedora-nvme-root ext4 n\a
/dev/nvme01p2 fedora-nvme-boot ext4 n\a
apiVersion: v1
kind: Service
metadata:
name: nginx
labels:
app: nginx
spec:
ports:
- port: 80
name: web

multi-write-pvc

GCE persistent disk + NFS server (single writer)

kind: Service
apiVersion: v1
metadata:
  name: nfs-server

How to install MS Core fonts on Fedora

  • install dependencies
$ sudo dnf install -y rpm-build ttmkfdir
  • prep the work space
@ervinb
ervinb / Jenkinsfile
Created October 30, 2019 09:34 — forked from jonico/Jenkinsfile
Example for a full blown Jenkins pipeline script with multiple stages, kubernetes templates, shared volumes, input steps, injected credentials, heroku deploy, sonarqube and artifactory integration, Docker containers, multiple Git commit statuses, PR merge vs branch build detection, REST API calls to GitHub deployment API, stage timeouts, stage c…
#!groovy
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
def label = "mypod-${UUID.randomUUID().toString()}"
podTemplate(label: label, yaml: """
spec:
containers:
- name: mvn
image: maven:3.3.9-jdk-8-alpine