├── chef ├── virtual │ ├── .DS_Store │ ├── ws │ │ └── Vagrantfile │ └── nodes │ │ └── Vagrantfile ├── .DS_Store └── labsetup │ ├── cookbooks │ ├── labsetup │ │ ├── Berksfile │ │ ├── spec │ │ │ ├── spec_helper.rb │ │ │ └── unit │ │ │ │ └── recipes │ │ │ │ ├── default_spec.rb │ │ │ │ ├── git-mac_spec.rb │ │ │ │ ├── atom-mac_spec.rb │ │ │ │ ├── atom-mac.rb_spec.rb │ │ │ │ ├── atom-windows_spec.rb │ │ │ │ ├── git-windows_spec.rb │ │ │ │ ├── vagrant-mac_spec.rb │ │ │ │ ├── vagrant-windows_spec.rb │ │ │ │ ├── virtualbox-mac_spec.rb │ │ │ │ └── virtualbox-windows_spec.rb │ │ ├── .gitignore │ │ ├── metadata.rb │ │ ├── test │ │ │ └── integration │ │ │ │ ├── helpers │ │ │ │ └── serverspec │ │ │ │ │ └── spec_helper.rb │ │ │ │ └── default │ │ │ │ └── serverspec │ │ │ │ └── default_spec.rb │ │ ├── recipes │ │ │ ├── atom-mac.rb │ │ │ ├── git-mac.rb │ │ │ ├── atom-windows.rb │ │ │ ├── git-windows.rb │ │ │ ├── vagrant-windows.rb │ │ │ ├── virtualbox-windows.rb │ │ │ ├── default.rb │ │ │ ├── vagrant-mac.rb │ │ │ └── virtualbox-mac.rb │ │ ├── .kitchen.yml │ │ ├── README.md │ │ ├── attributes │ │ │ └── default.rb │ │ └── chefignore │ ├── .DS_Store │ ├── .gitignore │ └── .kitchen.yml │ ├── .DS_Store │ └── chef-lab-setup-instructions.md ├── puppet ├── labsetup │ ├── modules │ │ ├── labsetup_windows │ │ │ ├── file │ │ │ │ └── sample.txt │ │ │ ├── .DS_Store │ │ │ ├── README.md │ │ │ └── manifests │ │ │ │ └── init.pp │ │ ├── .DS_Store │ │ └── labsetup_mac │ │ │ ├── README.md │ │ │ └── manifests │ │ │ └── init.pp │ └── puppet-lab-setup-instructions.md └── virtual │ └── nodes │ └── Vagrantfile ├── .DS_Store ├── images ├── .DS_Store ├── atom.PNG ├── chef.PNG ├── Conemu.PNG ├── lan-chef.png ├── vagrant.PNG ├── lan-puppet.png ├── virtualbox.PNG └── git-deskstop.PNG ├── kubernetes ├── vagrant-kube-cluster │ ├── kubernetes.list │ ├── hosts │ ├── setup-nfs.sh │ └── Vagrantfile ├── vagrant-nfs │ ├── setup-nfs.sh │ └── Vagrantfile └── vagrant-minikube │ ├── README.md │ └── Vagrantfile ├── docker ├── vagrant-docker-cluster │ ├── hosts │ ├── setup-nfs.sh │ └── Vagrantfile └── labsetup │ ├── docker_vm_env.md │ ├── docker-lab-setup-instructions.md │ ├── devops-workshop-lab-setup-instructions.md │ └── docker-cluster.md ├── ansible └── codespace │ └── Vagrantfile ├── ci └── virtual │ └── Vagrantfile ├── common ├── vagrant-cheat-sheet.md ├── hardware_software_requirements_ansible.md ├── hardware_software_requirements_devops.md ├── hardware_software_requirements.md ├── lab-setup-vagrant-vbox-only.md └── common-lab-setup-instructions.md ├── puppet-chef └── puppet-chef-lab-setup-instructions.md ├── README.md ├── devops └── labsetup │ └── devops-workshop-lab-setup-instructions.md └── basic-format.md /chef/virtual/.DS_Store: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /puppet/labsetup/modules/labsetup_windows/file/sample.txt: -------------------------------------------------------------------------------- 1 | hello 2 | -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/schoolofdevops/lab-setup/HEAD/.DS_Store -------------------------------------------------------------------------------- /chef/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/schoolofdevops/lab-setup/HEAD/chef/.DS_Store -------------------------------------------------------------------------------- /images/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/schoolofdevops/lab-setup/HEAD/images/.DS_Store -------------------------------------------------------------------------------- /images/atom.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/schoolofdevops/lab-setup/HEAD/images/atom.PNG -------------------------------------------------------------------------------- /images/chef.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/schoolofdevops/lab-setup/HEAD/images/chef.PNG -------------------------------------------------------------------------------- /images/Conemu.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/schoolofdevops/lab-setup/HEAD/images/Conemu.PNG -------------------------------------------------------------------------------- /images/lan-chef.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/schoolofdevops/lab-setup/HEAD/images/lan-chef.png -------------------------------------------------------------------------------- /images/vagrant.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/schoolofdevops/lab-setup/HEAD/images/vagrant.PNG -------------------------------------------------------------------------------- /chef/labsetup/cookbooks/labsetup/Berksfile: -------------------------------------------------------------------------------- 1 | source 'https://supermarket.chef.io' 2 | 3 | metadata 4 | -------------------------------------------------------------------------------- /images/lan-puppet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/schoolofdevops/lab-setup/HEAD/images/lan-puppet.png -------------------------------------------------------------------------------- /images/virtualbox.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/schoolofdevops/lab-setup/HEAD/images/virtualbox.PNG -------------------------------------------------------------------------------- /chef/labsetup/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/schoolofdevops/lab-setup/HEAD/chef/labsetup/.DS_Store -------------------------------------------------------------------------------- /chef/labsetup/cookbooks/labsetup/spec/spec_helper.rb: -------------------------------------------------------------------------------- 1 | require 'chefspec' 2 | require 'chefspec/berkshelf' 3 | -------------------------------------------------------------------------------- /images/git-deskstop.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/schoolofdevops/lab-setup/HEAD/images/git-deskstop.PNG -------------------------------------------------------------------------------- /kubernetes/vagrant-kube-cluster/kubernetes.list: -------------------------------------------------------------------------------- 1 | deb http://apt.kubernetes.io/ kubernetes-xenial main 2 | 3 | -------------------------------------------------------------------------------- /chef/labsetup/cookbooks/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/schoolofdevops/lab-setup/HEAD/chef/labsetup/cookbooks/.DS_Store -------------------------------------------------------------------------------- /puppet/labsetup/modules/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/schoolofdevops/lab-setup/HEAD/puppet/labsetup/modules/.DS_Store -------------------------------------------------------------------------------- /puppet/labsetup/modules/labsetup_windows/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/schoolofdevops/lab-setup/HEAD/puppet/labsetup/modules/labsetup_windows/.DS_Store -------------------------------------------------------------------------------- /chef/labsetup/cookbooks/.gitignore: -------------------------------------------------------------------------------- 1 | .vagrant 2 | Berksfile.lock 3 | *~ 4 | *# 5 | .#* 6 | \#*# 7 | .*.sw[a-z] 8 | *.un~ 9 | 10 | # Bundler 11 | Gemfile.lock 12 | bin/* 13 | .bundle/* 14 | 15 | .kitchen/ 16 | .kitchen.local.yml 17 | -------------------------------------------------------------------------------- /chef/labsetup/cookbooks/labsetup/.gitignore: -------------------------------------------------------------------------------- 1 | .vagrant 2 | Berksfile.lock 3 | *~ 4 | *# 5 | .#* 6 | \#*# 7 | .*.sw[a-z] 8 | *.un~ 9 | 10 | # Bundler 11 | Gemfile.lock 12 | bin/* 13 | .bundle/* 14 | 15 | .kitchen/ 16 | .kitchen.local.yml 17 | -------------------------------------------------------------------------------- /chef/labsetup/cookbooks/labsetup/metadata.rb: -------------------------------------------------------------------------------- 1 | name 'labsetup' 2 | maintainer 'The Authors' 3 | maintainer_email 'you@example.com' 4 | license 'all_rights' 5 | description 'Installs/Configures labsetup' 6 | long_description 'Installs/Configures labsetup' 7 | version '0.1.0' 8 | -------------------------------------------------------------------------------- /chef/labsetup/cookbooks/labsetup/test/integration/helpers/serverspec/spec_helper.rb: -------------------------------------------------------------------------------- 1 | require 'serverspec' 2 | 3 | if (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM).nil? 4 | set :backend, :exec 5 | else 6 | set :backend, :cmd 7 | set :os, family: 'windows' 8 | end 9 | -------------------------------------------------------------------------------- /docker/vagrant-docker-cluster/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 2 | ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 3 | 4 | 192.168.22.10 docker-01 5 | 192.168.22.11 docker-02 6 | 192.168.22.12 docker-03 7 | -------------------------------------------------------------------------------- /kubernetes/vagrant-kube-cluster/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 2 | ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 3 | 4 | 192.168.56.101 kube-01 5 | 192.168.56.102 kube-02 6 | 192.168.56.103 kube-03 7 | 8 | -------------------------------------------------------------------------------- /chef/labsetup/cookbooks/labsetup/test/integration/default/serverspec/default_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'labsetup::default' do 4 | # Serverspec examples can be found at 5 | # http://serverspec.org/resource_types.html 6 | it 'does something' do 7 | skip 'Replace this with meaningful tests' 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /chef/labsetup/cookbooks/labsetup/recipes/atom-mac.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook Name:: labsetup 3 | # Recipe:: atom-mac 4 | # 5 | # Copyright (c) 2016 The Authors, All Rights Reserved. 6 | execute 'atom install' do 7 | command 'brew cask install atom' 8 | not_if 'pkgutil --packages | grep atom || brew cask list | grep atom || brew list | grep atom' 9 | end -------------------------------------------------------------------------------- /chef/labsetup/cookbooks/labsetup/recipes/git-mac.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook Name:: labsetup 3 | # Recipe:: git-mac 4 | # 5 | # Copyright (c) 2016 The Authors, All Rights Reserved. 6 | 7 | ##git recipe 8 | 9 | execute 'git install' do 10 | command 'brew cask install git' 11 | not_if 'pkgutil --packages | grep git || brew cask list | grep git || brew list | grep git' 12 | end -------------------------------------------------------------------------------- /ansible/codespace/Vagrantfile: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | Vagrant.configure(2) do |config| 5 | config.vm.box = "ansible" 6 | config.vm.hostname = "ansible" 7 | config.vm.network "private_network", ip: "192.168.46.10" 8 | config.vm.provider :virtualbox do |vb| 9 | vb.customize ["modifyvm", :id, "--memory", "2048"] 10 | vb.customize ["modifyvm", :id, "--cpus", "2"] 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /puppet/labsetup/modules/labsetup_mac/README.md: -------------------------------------------------------------------------------- 1 | #Labsetup_mac puppet module 2 | 3 | ###Prerequisites to run this module:- 4 | - wget utility on your system 5 | 6 | ###Cookbook is used to install packages on mac 7 | 8 | - atom editor 9 | - git 10 | - vagrant(version-1.8.1) 11 | - virtualbox(version-5.0.20) 12 | 13 | ###To run puppet module locally 14 | 15 | sudo puppet apply manifests/init.pp 16 | 17 | 18 | -------------------------------------------------------------------------------- /chef/labsetup/cookbooks/.kitchen.yml: -------------------------------------------------------------------------------- 1 | --- 2 | driver: 3 | name: vagrant 4 | 5 | provisioner: 6 | name: chef_zero 7 | 8 | # Uncomment the following verifier to leverage Inspec instead of Busser (the 9 | # default verifier) 10 | # verifier: 11 | # name: inspec 12 | 13 | platforms: 14 | - name: ubuntu-14.04 15 | - name: centos-7.1 16 | 17 | suites: 18 | - name: default 19 | run_list: 20 | - recipe[pack::default] 21 | attributes: 22 | -------------------------------------------------------------------------------- /chef/labsetup/cookbooks/labsetup/.kitchen.yml: -------------------------------------------------------------------------------- 1 | --- 2 | driver: 3 | name: vagrant 4 | 5 | provisioner: 6 | name: chef_zero 7 | 8 | # Uncomment the following verifier to leverage Inspec instead of Busser (the 9 | # default verifier) 10 | # verifier: 11 | # name: inspec 12 | 13 | platforms: 14 | - name: ubuntu-14.04 15 | - name: centos-7.1 16 | 17 | suites: 18 | - name: default 19 | run_list: 20 | - recipe[labsetup::default] 21 | attributes: 22 | -------------------------------------------------------------------------------- /docker/vagrant-docker-cluster/setup-nfs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | sudo apt-get update 3 | sudo apt-get install nfs-kernel-server -y 4 | sudo mkdir -p /var/nfs/kubernetes 5 | sudo chown nobody:nogroup /var/nfs/kubernetes 6 | sudo chmod 666 /etc/exports 7 | sudo cat > /etc/exports < /etc/exports < /etc/exports < "#{node['labsetup']['path']}#{node['labsetup']['atom_display_name']}.exe" 14 | }) 15 | installer_type :inno 16 | end 17 | -------------------------------------------------------------------------------- /chef/labsetup/cookbooks/labsetup/spec/unit/recipes/default_spec.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook Name:: labsetup 3 | # Spec:: default 4 | # 5 | # Copyright (c) 2016 The Authors, All Rights Reserved. 6 | 7 | require 'spec_helper' 8 | 9 | describe 'labsetup::default' do 10 | context 'When all attributes are default, on an unspecified platform' do 11 | let(:chef_run) do 12 | runner = ChefSpec::ServerRunner.new 13 | runner.converge(described_recipe) 14 | end 15 | 16 | it 'converges successfully' do 17 | expect { chef_run }.to_not raise_error 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /chef/labsetup/cookbooks/labsetup/spec/unit/recipes/git-mac_spec.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook Name:: labsetup 3 | # Spec:: default 4 | # 5 | # Copyright (c) 2016 The Authors, All Rights Reserved. 6 | 7 | require 'spec_helper' 8 | 9 | describe 'labsetup::git-mac' do 10 | context 'When all attributes are default, on an unspecified platform' do 11 | let(:chef_run) do 12 | runner = ChefSpec::ServerRunner.new 13 | runner.converge(described_recipe) 14 | end 15 | 16 | it 'converges successfully' do 17 | expect { chef_run }.to_not raise_error 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /chef/labsetup/cookbooks/labsetup/spec/unit/recipes/atom-mac_spec.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook Name:: labsetup 3 | # Spec:: default 4 | # 5 | # Copyright (c) 2016 The Authors, All Rights Reserved. 6 | 7 | require 'spec_helper' 8 | 9 | describe 'labsetup::atom-mac' do 10 | context 'When all attributes are default, on an unspecified platform' do 11 | let(:chef_run) do 12 | runner = ChefSpec::ServerRunner.new 13 | runner.converge(described_recipe) 14 | end 15 | 16 | it 'converges successfully' do 17 | expect { chef_run }.to_not raise_error 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /chef/labsetup/cookbooks/labsetup/spec/unit/recipes/atom-mac.rb_spec.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook Name:: labsetup 3 | # Spec:: default 4 | # 5 | # Copyright (c) 2016 The Authors, All Rights Reserved. 6 | 7 | require 'spec_helper' 8 | 9 | describe 'labsetup::atom-mac.rb' do 10 | context 'When all attributes are default, on an unspecified platform' do 11 | let(:chef_run) do 12 | runner = ChefSpec::ServerRunner.new 13 | runner.converge(described_recipe) 14 | end 15 | 16 | it 'converges successfully' do 17 | expect { chef_run }.to_not raise_error 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /chef/labsetup/cookbooks/labsetup/spec/unit/recipes/atom-windows_spec.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook Name:: labsetup 3 | # Spec:: default 4 | # 5 | # Copyright (c) 2016 The Authors, All Rights Reserved. 6 | 7 | require 'spec_helper' 8 | 9 | describe 'labsetup::atom-windows' do 10 | context 'When all attributes are default, on an unspecified platform' do 11 | let(:chef_run) do 12 | runner = ChefSpec::ServerRunner.new 13 | runner.converge(described_recipe) 14 | end 15 | 16 | it 'converges successfully' do 17 | expect { chef_run }.to_not raise_error 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /chef/labsetup/cookbooks/labsetup/spec/unit/recipes/git-windows_spec.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook Name:: labsetup 3 | # Spec:: default 4 | # 5 | # Copyright (c) 2016 The Authors, All Rights Reserved. 6 | 7 | require 'spec_helper' 8 | 9 | describe 'labsetup::git-windows' do 10 | context 'When all attributes are default, on an unspecified platform' do 11 | let(:chef_run) do 12 | runner = ChefSpec::ServerRunner.new 13 | runner.converge(described_recipe) 14 | end 15 | 16 | it 'converges successfully' do 17 | expect { chef_run }.to_not raise_error 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /chef/labsetup/cookbooks/labsetup/spec/unit/recipes/vagrant-mac_spec.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook Name:: labsetup 3 | # Spec:: default 4 | # 5 | # Copyright (c) 2016 The Authors, All Rights Reserved. 6 | 7 | require 'spec_helper' 8 | 9 | describe 'labsetup::vagrant-mac' do 10 | context 'When all attributes are default, on an unspecified platform' do 11 | let(:chef_run) do 12 | runner = ChefSpec::ServerRunner.new 13 | runner.converge(described_recipe) 14 | end 15 | 16 | it 'converges successfully' do 17 | expect { chef_run }.to_not raise_error 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /chef/labsetup/cookbooks/labsetup/spec/unit/recipes/vagrant-windows_spec.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook Name:: labsetup 3 | # Spec:: default 4 | # 5 | # Copyright (c) 2016 The Authors, All Rights Reserved. 6 | 7 | require 'spec_helper' 8 | 9 | describe 'labsetup::vagrant-windows' do 10 | context 'When all attributes are default, on an unspecified platform' do 11 | let(:chef_run) do 12 | runner = ChefSpec::ServerRunner.new 13 | runner.converge(described_recipe) 14 | end 15 | 16 | it 'converges successfully' do 17 | expect { chef_run }.to_not raise_error 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /chef/labsetup/cookbooks/labsetup/spec/unit/recipes/virtualbox-mac_spec.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook Name:: labsetup 3 | # Spec:: default 4 | # 5 | # Copyright (c) 2016 The Authors, All Rights Reserved. 6 | 7 | require 'spec_helper' 8 | 9 | describe 'labsetup::virtualbox-mac' do 10 | context 'When all attributes are default, on an unspecified platform' do 11 | let(:chef_run) do 12 | runner = ChefSpec::ServerRunner.new 13 | runner.converge(described_recipe) 14 | end 15 | 16 | it 'converges successfully' do 17 | expect { chef_run }.to_not raise_error 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /chef/labsetup/cookbooks/labsetup/spec/unit/recipes/virtualbox-windows_spec.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook Name:: labsetup 3 | # Spec:: default 4 | # 5 | # Copyright (c) 2016 The Authors, All Rights Reserved. 6 | 7 | require 'spec_helper' 8 | 9 | describe 'labsetup::virtualbox-windows' do 10 | context 'When all attributes are default, on an unspecified platform' do 11 | let(:chef_run) do 12 | runner = ChefSpec::ServerRunner.new 13 | runner.converge(described_recipe) 14 | end 15 | 16 | it 'converges successfully' do 17 | expect { chef_run }.to_not raise_error 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /chef/labsetup/cookbooks/labsetup/recipes/git-windows.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook Name:: labsetup 3 | # Recipe:: git-windows 4 | # 5 | # Copyright (c) 2016 The Authors, All Rights Reserved. 6 | windows_package node['labsetup']['git_display_name'] do 7 | not_if do 8 | File.exist?("#{node['labsetup']['path']}#{node['labsetup']['git_display_name']}.exe") 9 | end 10 | action :install 11 | source node['labsetup']['git_url'] 12 | checksum node['labsetup']['git_checksum'] 13 | remote_file_attributes ({ 14 | :path => "#{node['labsetup']['path']}#{node['labsetup']['git_display_name']}.exe" 15 | }) 16 | installer_type :inno 17 | options "/VERYSILENT" 18 | end 19 | -------------------------------------------------------------------------------- /chef/labsetup/cookbooks/labsetup/recipes/vagrant-windows.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook Name:: labsetup 3 | # Recipe:: vagrant-windows 4 | # 5 | # Copyright (c) 2016 The Authors, All Rights Reserved. 6 | windows_package node['labsetup']['vagrant_display_name'] do 7 | not_if do 8 | File.exist?("#{node['labsetup']['path']}#{node['labsetup']['vagrant_display_name']}.msi") 9 | end 10 | action :install 11 | source node['labsetup']['vagrant_url'] 12 | checksum node['labsetup']['vagrant_checksum'] 13 | remote_file_attributes ({ 14 | :path => "#{node['labsetup']['path']}#{node['labsetup']['vagrant_display_name']}.msi" 15 | }) 16 | installer_type :msi 17 | end 18 | -------------------------------------------------------------------------------- /chef/labsetup/cookbooks/labsetup/recipes/virtualbox-windows.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook Name:: labsetup 3 | # Recipe:: virtualbox-windows 4 | # 5 | # Copyright (c) 2016 The Authors, All Rights Reserved. 6 | windows_package node['labsetup']['virtualbox_display_name'] do 7 | not_if do 8 | File.exist?("#{node['labsetup']['path']}#{node['labsetup']['virtualbox_display_name']}.exe") 9 | end 10 | action :install 11 | source node['labsetup']['virtualbox_url'] 12 | checksum node['labsetup']['virtualbox_checksum'] 13 | remote_file_attributes ({ 14 | :path => "#{node['labsetup']['path']}#{node['labsetup']['virtualbox_display_name']}.exe" 15 | }) 16 | installer_type :custom 17 | options "-s" 18 | end -------------------------------------------------------------------------------- /puppet/labsetup/modules/labsetup_windows/README.md: -------------------------------------------------------------------------------- 1 | #Labsetup_windows module 2 | 3 | ###Prerequisites to run this puppet module:- 4 | - All packages that to be installed require on your local machine (exe/msi files) 5 | - Here it stored in directory 6 |
 7 |     |
 8 |     |--puppet
 9 |     |       |
10 |     |       |--modules
11 |     |       |         |
12 |     |       |         |--labsetup_windows
13 |     |       |         |                 |
14 |     |       |         |                 |--files
15 | 
16 | 17 | ###Puupet module is used to install packages:- 18 | 19 | - git 20 | - atom editor 21 | - vagarant(version-1.8.1) 22 | - virtualbox(version-5.0.20) 23 | 24 | 25 | ###To run module locally 26 | 27 | sudo puppet apply manifests/init.pp 28 | -------------------------------------------------------------------------------- /kubernetes/vagrant-minikube/README.md: -------------------------------------------------------------------------------- 1 | # Minikube set up using Vagrant 2 | 1. Install Vagrant and Virtualbox in your machine 3 | 2. Start the VM, 4 | ``` 5 | vagrant up 6 | ``` 7 | 3. Connect to the VM, 8 | ``` 9 | vagrant ssh 10 | ``` 11 | 4. Start the *minikube* service by running, 12 | ``` 13 | sudo minikube start --vm-driver=none 14 | ``` 15 | 5. Then change the owner and group of the config files 16 | ``` 17 | #change permission for kube configs 18 | sudo chown -R $USER $HOME/.kube 19 | sudo chgrp -R $USER $HOME/.kube 20 | #change permission for minikube configs 21 | sudo chown -R $USER $HOME/.minikube 22 | sudo chgrp -R $USER $HOME/.minikube 23 | ``` 24 | 6. Check the status of your minikube cluster 25 | ``` 26 | kubectl get node 27 | kubectl get pods --all-namespaces 28 | ``` 29 | 30 | -------------------------------------------------------------------------------- /common/vagrant-cheat-sheet.md: -------------------------------------------------------------------------------- 1 | # Vagrant Cheat Sheet 2 | 3 | ### Importing Templates/Boxes 4 | * vagrant box add/list 5 | 6 | ### Bring up VMs 7 | * vagrant up 8 | * Vagrant up xyz 9 | 10 | ### Connecting to the VM 11 | 12 | * vagrant ssh 13 | 14 | ### Working with the Virtual Environment 15 | 16 | * vagrant status 17 | * vagrant global-status 18 | * vagrant ssh-config 19 | * vagrant provision 20 | * vagrant push 21 | * vagrant share/connect 22 | 23 | ### Starting and Stopping VMs 24 | 25 | * vagrant halt 26 | * vagrant up 27 | * vagrant reload 28 | 29 | ### Suspend and Resume VMs 30 | 31 | * vagrant suspend 32 | * vagrant resume 33 | 34 | ### Create a Template from a running VM 35 | 36 | * vagrant package 37 | 38 | 39 | ### Vagrantfile Primer 40 | -------------------------------------------------------------------------------- /common/hardware_software_requirements_ansible.md: -------------------------------------------------------------------------------- 1 | # Lab Setup - Pre Requisites for Ansible Training 2 | ## Hardware and Software 3 | ==================== 4 | 5 | #### Hardware Prerequisites 6 | 7 | | COMPONENT | MINIMUM REQUIREMENT | 8 | | :------------- | :------------- | 9 | | System | Laptop/Desktop with internet connection | 10 | | Memory | 8GB RAM | 11 | | CPU | Quad Core CPU | 12 | | Disk Space | 20 GB Disk Space available | 13 | | OS | Windows / OSX | 14 | 15 | #### Softwares Prerequisites 16 | 17 | | Software | Version Tested | License | 18 | | :------------- | :------------- | :------------- | 19 | | Docker Toolbox | 1.12.3 | Open Source/Free | 20 | | Git | 2.8.3 | Open Source/Free | 21 | | ConEmu ( on windows only) | 150813g | Open Source/Free | 22 | -------------------------------------------------------------------------------- /chef/labsetup/cookbooks/labsetup/recipes/default.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook Name:: labsetup 3 | # Recipe:: default 4 | # 5 | # Copyright (c) 2016 The Authors, All Rights Reserved. 6 | case node['platform_family'] 7 | when 'mac_os_x' 8 | ##install wget 9 | execute 'wget install' do 10 | command 'brew install wget' 11 | not_if 'pkgutil --packages | grep wget || brew cask list | grep wget || brew list | grep wget' 12 | end 13 | include_recipe "labsetup::atom-mac" 14 | include_recipe "labsetup::git-mac" 15 | include_recipe "labsetup::vagrant-mac" 16 | include_recipe "labsetup::virtualbox-mac" 17 | 18 | when 'windows' 19 | include_recipe "labsetup::atom-windows" 20 | include_recipe "labsetup::git-windows" 21 | include_recipe "labsetup::vagrant-windows" 22 | include_recipe "labsetup::virtualbox-windows" 23 | 24 | end -------------------------------------------------------------------------------- /common/hardware_software_requirements_devops.md: -------------------------------------------------------------------------------- 1 | # Lab Setup - Pre Requisites 2 | ## Hardware and Software 3 | ==================== 4 | 5 | #### Hardware Prerequisites 6 | 7 | | COMPONENT | MINIMUM REQUIREMENT | 8 | | :------------- | :------------- | 9 | | System | Laptop/Desktop with internet connection | 10 | | Memory | 8GB RAM | 11 | | CPU | Quad Core CPU | 12 | | Disk Space | 20 GB Disk Space available | 13 | | OS | Windows / OSX | 14 | 15 | #### Softwares Prerequisites 16 | 17 | | Software | Platforms Applicable | Version Tested | License | 18 | | :------------- | :------------- | :------------- | :------------- | 19 | | Docker Toolbox | Windows/ Mac OSX | 1.12.3 | Open Source/Free | 20 | | Atom | Windows/ Mac OS X | 1.7.4 | Open Source/Free | 21 | | Git for Windows | Windows | 2.8.3 | Open Source/Free | 22 | | ConEmu | Windows | 150813g | Open Source/Free | 23 | -------------------------------------------------------------------------------- /puppet/labsetup/puppet-lab-setup-instructions.md: -------------------------------------------------------------------------------- 1 | # Lab Setup Instructions - Puppet 2 | ==================== 3 | 4 | #### System Prerequisites : Hardware and Software 5 | 6 | Refer to [Hardware and Software Pre Requisites](https://github.com/schoolofdevops/lab-setup/blob/master/common/hardware_software_requirements.md) page. 7 | 8 | 9 | ### Systems Preparation 10 | For preparing system to run virtual machines, and with setup of useful utilities refer to [Common Lab Setup Instructions](https://github.com/schoolofdevops/lab-setup/blob/master/common/common-lab-setup-instructions.md). 11 | 12 | 13 | #### Install Puppet Plugin for Atom 14 | * Open Atom editor 15 | * On OS X, select **Atom** -> **Preferences**. On Windows **File** -> **Settings** 16 | * From **Install**, Search for **language-puppet** and install the extension. 17 | * Restart Atom 18 | 19 | ![Extenstion for puupet language installation](/images/lan-puppet.png) 20 | -------------------------------------------------------------------------------- /common/hardware_software_requirements.md: -------------------------------------------------------------------------------- 1 | # Lab Setup - Pre Requisites 2 | ## Hardware and Software 3 | ==================== 4 | 5 | #### Hardware Prerequisites 6 | 7 | | COMPONENT | MINIMUM REQUIREMENT | 8 | | :------------- | :------------- | 9 | | System | Laptop/Desktop with internet connection | 10 | | Memory | 8GB RAM | 11 | | CPU | Quad Core CPU | 12 | | Disk Space | 20 GB Disk Space available | 13 | | OS | Windows / OSX | 14 | 15 | #### Softwares Prerequisites 16 | 17 | | Software | Version Tested | License | 18 | | :------------- | :------------- | :------------- | 19 | | Docker Desktop | latest | Open Source/Free | 20 | | Virtualbox | 5.0.20 | Open Source/Free | 21 | | Vagrant | 1.8.1 | Open Source/Free | 22 | | Atom | 1.7.4 | Open Source/Free | 23 | | Git for Windows ( on windows only) | 2.8.3 | Open Source/Free | 24 | | ConEmu ( on windows only) | 150813g | Open Source/Free | 25 | -------------------------------------------------------------------------------- /docker/labsetup/docker_vm_env.md: -------------------------------------------------------------------------------- 1 | ## Import Vagtant Template (box) 2 | 3 | Change into the dir which contains ubuntu1604-13.box 4 | 5 | ``` 6 | vagrant box add docker-template ubuntu1604-13.box 7 | 8 | ``` 9 | 10 | Validate 11 | 12 | ``` 13 | vagrant box list 14 | 15 | ansible (virtualbox, 0) 16 | chef (virtualbox, 0) 17 | docker-template (virtualbox, 0) 18 | dummy (aws, 0) 19 | ``` 20 | 21 | ## Launch the VM with Vagrant 22 | 23 | Change into the directory which contains the Vagrantfile. 24 | 25 | e.g. 26 | 27 | cd virual/docker 28 | 29 | ``` 30 | vagrant up 31 | vagrant ssh 32 | 33 | ``` 34 | 35 | 36 | ## Loading Docker Images 37 | 38 | Copy over all docker images to the directory which contains the vagrantfile above. 39 | 40 | 41 | Load the dockerfiles one by one 42 | ``` 43 | docker load /vagrant/xyz.tar 44 | ``` 45 | 46 | Validate 47 | 48 | ``` 49 | docker images 50 | ``` 51 | 52 | ## Launch Sample Docker Containers 53 | 54 | ``` 55 | docker run -its --name sample 56 | ``` 57 | -------------------------------------------------------------------------------- /chef/labsetup/cookbooks/labsetup/README.md: -------------------------------------------------------------------------------- 1 | # labsetup 2 | ###For os x:- 3 | 4 | ####Prerequisites to run cookbook on mac:- 5 | 6 | Install brew on your local machine without sudo/root previlleges using this command:- 7 | 8 | /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 9 | 10 | #####cookbook used to install packages for mac os:- 11 | 12 | - wget 13 | - atom editor 14 | - git 15 | - vagrant (version-1.8.1) 16 | - virtualbox (version-5.0.20) 17 | 18 | ###For windows:- 19 | 20 | #####cookbook used to install packages for windows:- 21 | 22 | - atom editor 23 | - git 24 | - vagrant (version-1.8.1) 25 | - virtualbox (version-5.0.20) 26 | 27 | #####Default attributes 28 | 29 | - modify installation package path as per your requirement for windows 30 | 31 | default['labsetup']['path '] = "C://'" 32 | 33 | ###Run cookbook locally:- 34 | 35 | chef-client --local-mode -r 'recipe[labsetup]' 36 | 37 | ###Note:- 38 | On os x run without sudo privilleges 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /chef/virtual/nodes/Vagrantfile: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | Vagrant.configure(2) do |config| 5 | config.vm.box = "chef" 6 | 7 | config.vm.define "web1" do |web1| 8 | web1.vm.hostname = 'web1' 9 | web1.vm.network :private_network, ip: "192.168.8.12" 10 | web1.vm.provider :virtualbox do |vb| 11 | vb.memory = "512" 12 | end 13 | end 14 | 15 | config.vm.define "web2" do |web2| 16 | web2.vm.hostname = 'web2' 17 | web2.vm.network :private_network, ip: "192.168.8.13" 18 | web2.vm.provider :virtualbox do |vb| 19 | vb.memory = "512" 20 | end 21 | end 22 | 23 | config.vm.define "db" do |db| 24 | db.vm.hostname = 'db' 25 | db.vm.network :private_network, ip: "192.168.8.14" 26 | db.vm.provider :virtualbox do |vb| 27 | vb.memory = "512" 28 | end 29 | end 30 | 31 | config.vm.define "haproxy" do |haproxy| 32 | haproxy.vm.hostname = 'haproxy' 33 | haproxy.vm.network :private_network, ip: "192.168.8.15" 34 | haproxy.vm.provider :virtualbox do |vb| 35 | vb.memory = "512" 36 | end 37 | end 38 | 39 | 40 | end 41 | -------------------------------------------------------------------------------- /kubernetes/vagrant-minikube/Vagrantfile: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | Vagrant.configure(2) do |config| 5 | 6 | config.vm.box = "ubuntu/trusty64" 7 | 8 | config.vm.define "minikube" do |kube| 9 | kube.vm.hostname = "minikube" 10 | kube.vm.network "private_network", ip: "192.168.12.25" 11 | config.vm.provider :virtualbox do |vb| 12 | vb.customize ["modifyvm", :id, "--memory", "2048"] 13 | vb.customize ["modifyvm", :id, "--cpus", "2"] 14 | end 15 | kube.vm.provision "shell", inline: $script 16 | end 17 | 18 | $script = <