Skip to content

Instantly share code, notes, and snippets.

View dalmosantos's full-sized avatar

Dalmo Santos dalmosantos

View GitHub Profile

On master and nodes

Pull images form internet access laptop

docker pull gcr.io/google_containers/kube-apiserver-amd64:v1.5.0
docker pull gcr.io/google_containers/kube-controller-manager-amd64:v1.5.0
docker pull gcr.io/google_containers/kube-proxy-amd64:v1.5.0
docker pull gcr.io/google_containers/kube-scheduler-amd64:v1.5.0
docker pull weaveworks/weave-npc:1.8.2
docker pull weaveworks/weave-kube:1.8.2
@dalmosantos
dalmosantos / swapcleaner.sh
Created May 6, 2019 19:20
swapcleaner.sh
#!/bin/bash
# swapcleaner.sh - Limpa a area de swap automaticamente
# Autor: Paulo Victor - [email protected] - 01/2014
#
# Alteracoes:
#
# Data Autor Descricao
# ---------- ------------------- ----------------------------------------------------
# 6/2014 Paulo Victor Adicionado a funcao trap
#====================================================================================
@dalmosantos
dalmosantos / install_jenkins_plugin.sh
Created April 16, 2019 12:49 — forked from micw/install_jenkins_plugin.sh
Script to install one or more jenkins plugins including dependencies while jenkins is offline
#!/bin/bash
set -e
if [ $# -eq 0 ]; then
echo "USAGE: $0 plugin1 plugin2 ..."
exit 1
fi
plugin_dir=/var/lib/jenkins/plugins
@dalmosantos
dalmosantos / Jenkinsfile
Created April 15, 2019 16:29 — forked from bvis/Jenkinsfile
Jenkin pipeline definition example to be integrated with Docker Swarm cluster in our CI/CD environment
pipeline {
agent { node { label 'swarm-ci' } }
environment {
TEST_PREFIX = "test-IMAGE"
TEST_IMAGE = "${env.TEST_PREFIX}:${env.BUILD_NUMBER}"
TEST_CONTAINER = "${env.TEST_PREFIX}-${env.BUILD_NUMBER}"
REGISTRY_ADDRESS = "my.registry.address.com"
SLACK_CHANNEL = "#deployment-notifications"
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.box_check_update = true
@dalmosantos
dalmosantos / Vagrantfile-cluster-centos-libvirt
Last active January 5, 2021 21:31
Vagrantfile-cluster-centos-docker
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "centos/7"
config.vm.synced_folder ".", "/vagrant"
config.vm.provider :libvirt do |libvirt, override|
#!/bin/sh
DOCKER_IP=$(ip addr show eth0 | grep -E '^\s*inet' | grep -m1 global | awk '{ print $2 }' | sed 's|/.*||')
JBOSS_COMMON_ARGS="-Djboss.bind.address=$DOCKER_IP -Djboss.bind.address.management=$DOCKER_IP "
JBOSS_NODE_NAME_ARGS="-Djboss.node.name=$JBOSS_EAP_NODE_NAME "
JBOSS_MANAGEMENT_PORT_ARGS="-Djboss.management.native.port=$JBOSS_EAP_MGMT_NATIVE_PORT -Djboss.management.http.port=$JBOSS_EAP_MGMT_HTTP_PORT -Djboss.management.https.port=$JBOSS_EAP_MGMT_HTTPS_PORT "
JBOSS_DEFAULT_PORT_ARGS="-Djboss.default.ajp.port=$JBOSS_EAP_AJP_PORT -Djboss.default.http.port=$JBOSS_EAP_HTTP_PORT -Djboss.default.https.port=$JBOSS_EAP_HTTPS_PORT "
if [[ -z "$JBOSS_EAP_STANDALONE_CONF_FILE " ]] ; then
echo "No custom JBoss Application Server configuration file set. Using the default standalone-full-ha.xml"
#/bin/sh
#
# Script that patches a JBoss EAP installation.
#
# This script expects EAP not to be running. If EAP is already running, this script will produce undefined results.
#
# author: [email protected]
#
# Source function library.
@dalmosantos
dalmosantos / download-frozen-image-v2.sh
Created February 15, 2019 18:47
download-frozen-image-v2.sh
#!/usr/bin/env bash
set -eo pipefail
# hello-world latest ef872312fe1b 3 months ago 910 B
# hello-world latest ef872312fe1bbc5e05aae626791a47ee9b032efa8f3bda39cc0be7b56bfe59b9 3 months ago 910 B
# debian latest f6fab3b798be 10 weeks ago 85.1 MB
# debian latest f6fab3b798be3174f45aa1eb731f8182705555f89c9026d8c1ef230cbf8301dd 10 weeks ago 85.1 MB
# check if essential commands are in our PATH
@dalmosantos
dalmosantos / Jenkinsfile
Created January 30, 2019 21:29 — forked from ysegorov/Jenkinsfile
Jenkinsfile example
#!/usr/bin/env groovy
// https://github.com/freebsd/freebsd-ci/blob/master/scripts/build/build-test.groovy
// http://stackoverflow.com/a/40294220
// https://JENKINS_HOST/scriptApproval/ - for script approval
import java.util.Date
def isMaster = env.BRANCH_NAME == 'master'
def isDevelop = env.BRANCH_NAME == 'develop'