This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yum update -y | |
rpm -Uvh https://yum.puppetlabs.com/puppetlabs-release-pc1-el-6.noarch.rpm | |
yum install puppetserver | |
echo 'export PATH=/opt/puppetlabs/puppet/bin/:$PATH' >> /etc/profile | |
source /etc/profile | |
service puppetserver restart | |
chkconfig puppetserver on | |
/opt/puppetlabs/puppet/bin/gem install r10k | |
cd /etc/puppetlabs/puppet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install the dependencies | |
yum groupinstall -y development tools | |
yum install -y curl-devel expat-devel gettext-devel nss openssl-devel perl-devel tar zlib-devel libxml2 libxml2-devel libxslt libxslt-devel | |
yum clean all | |
# install git 2.10.2 | |
curl https://www.kernel.org/pub/software/scm/git/git-2.10.2.tar.gz | tar xz | |
cd git-2.10.2 | |
make prefix=/usr/local | |
make prefix=/usr/local install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSTALLATION | |
Copy jenkins-slave.init to /etc/init.d/jenkins-slave and copy jenkins-slave to /etc/sysconfig/jenkins-slave. | |
cp jenkins-slave.init /etc/init.d/jenkins-slave | |
cp jenkins-slave /etc/sysconfig/jenkins-slave | |
chkconfig jenkins-slave on | |
service jenkins-slave start | |
Change the values of /etc/sysconfig/jenkins-slave to match your environment needs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rbvmomi' | |
hostname = '192.168.1.200'; | |
username = '[email protected]'; | |
password = 'P@ssword123'; | |
vim = RbVmomi::VIM.connect host: hostname, user: username, password: password, insecure: true; | |
rootFolder = vim.serviceInstance.content.rootFolder | |
viewManager = vim.serviceInstance.content.viewManager | |
viewManager.CreateContainerView( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# this script can be scheduled to run daily at midnight by adding a cron job like the following: | |
# 0 0 * * * /root/docker_cleanup.sh | |
# | |
docker rm -v $(docker ps -a -q -f status=exited) | logger -t "docker_cleanup.sh" | |
docker rmi $(docker images -f "dangling=true" -q) | logger -t "docker_cleanup.sh" | |
docker volume rm $(docker volume ls -qf dangling=true) | logger -t "docker_cleanup.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rbvmomi' | |
credentials = { :host => "192.168.1.10", :user => "[email protected]", :password => "vmware", :insecure => true } | |
vim = RbVmomi::VIM.connect(credentials) | |
datacenter = vim.rootFolder.childEntity.first # grab the first datacenter | |
datacenter.hostFolder.childEntity # this will return an array of all the clusters in the datacenter | |
cluster = datacenter.hostFolder.childEntity.first # grab the first cluster from the datacenter | |
cluster.host # this will return an array of all the ESXi hosts in the first cluster | |
host = cluster.host.first # grab the first host in the cluster | |
host.config.network.vnic # display all the vnics on the host |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rbvmomi'; | |
credentials = { :host => "192.168.1.10", :user => "[email protected]", :password => "vmware", :insecure => true }; | |
vim = RbVmomi::VIM.connect(credentials); | |
datacenters = {}; | |
vim.rootFolder.childEntity.each { |datacenter| | |
datacenter_info = {} | |
datacenter.hostFolder.childEntity.each { |cluster| | |
cluster_info = {} | |
cluster.host.each { |host| | |
host_info = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vagrant box add bento/centos-7.3 | |
ls ~/.vagrant.d/boxes/bento-VAGRANTSLASH-centos-7.3/2.3.5/vmware_desktop/*.vmx | |
mkdir ~/.vagrant.d/boxes/bento-VAGRANTSLASH-centos-7.3/2.3.5/vmware_ovf/ | |
ovftool -tt=ovf /root/.vagrant.d/boxes/bento-VAGRANTSLASH-centos-7.3/2.3.5/vmware_desktop/centos-7.3-x86_64.vmx ~/.vagrant.d/boxes/bento-VAGRANTSLASH-centos-7.3/2.3.5/vmware_ovf/centos-7.3-x86_64.ovf | |
echo '{"provider":"vmware_ovf"}' >> ~/.vagrant.d/boxes/bento-VAGRANTSLASH-centos-7.3/2.3.5/vmware_ovf/metadata.json | |
touch ~/.vagrant.d/boxes/bento-VAGRANTSLASH-centos-7.3/2.3.5/vmware_ovf/Vagrantfile | |
cd ~/.vagrant.d/boxes/bento-VAGRANTSLASH-centos-7.3/2.3.5/vmware_ovf/ | |
tar cvzf /root/centos-7.3-vmware_ovf-1.0.box ./* | |
vagrant box add ~/centos-7.3-vmware_ovf-1.0.box --name centos-7.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here are some resources you should check out if you are learning / new to Go: | |
First you should take the language tour: http://tour.golang.org/ | |
Then, you should visit: | |
https://golang.org/doc/code.html to learn how to organize your Go workspace | |
https://golang.org/doc/effective_go.html be more effective at writing Go | |
https://golang.org/ref/spec learn more about the language itself | |
https://golang.org/doc/#articles a lot more reading material | |
There are some awesome websites as well: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure('2') do |config| | |
# All Vagrant configuration is done here. The most common configuration | |
# options are documented and commented below. For a complete reference, | |
# please see the online documentation at vagrantup.com. | |
config.vm.define :'centos7-powercli' do |m| | |
m.vm.box = 'standorsett/centos-7' |
OlderNewer