├── .DS_Store
├── README.md
├── ansible
└── codespace
│ └── Vagrantfile
├── basic-format.md
├── chef
├── .DS_Store
├── labsetup
│ ├── .DS_Store
│ ├── chef-lab-setup-instructions.md
│ └── cookbooks
│ │ ├── .DS_Store
│ │ ├── .gitignore
│ │ ├── .kitchen.yml
│ │ └── labsetup
│ │ ├── .gitignore
│ │ ├── .kitchen.yml
│ │ ├── Berksfile
│ │ ├── README.md
│ │ ├── attributes
│ │ └── default.rb
│ │ ├── chefignore
│ │ ├── metadata.rb
│ │ ├── recipes
│ │ ├── atom-mac.rb
│ │ ├── atom-windows.rb
│ │ ├── default.rb
│ │ ├── git-mac.rb
│ │ ├── git-windows.rb
│ │ ├── vagrant-mac.rb
│ │ ├── vagrant-windows.rb
│ │ ├── virtualbox-mac.rb
│ │ └── virtualbox-windows.rb
│ │ ├── spec
│ │ ├── spec_helper.rb
│ │ └── unit
│ │ │ └── recipes
│ │ │ ├── atom-mac.rb_spec.rb
│ │ │ ├── atom-mac_spec.rb
│ │ │ ├── atom-windows_spec.rb
│ │ │ ├── default_spec.rb
│ │ │ ├── git-mac_spec.rb
│ │ │ ├── git-windows_spec.rb
│ │ │ ├── vagrant-mac_spec.rb
│ │ │ ├── vagrant-windows_spec.rb
│ │ │ ├── virtualbox-mac_spec.rb
│ │ │ └── virtualbox-windows_spec.rb
│ │ └── test
│ │ └── integration
│ │ ├── default
│ │ └── serverspec
│ │ │ └── default_spec.rb
│ │ └── helpers
│ │ └── serverspec
│ │ └── spec_helper.rb
└── virtual
│ ├── .DS_Store
│ ├── nodes
│ └── Vagrantfile
│ └── ws
│ └── Vagrantfile
├── ci
└── virtual
│ └── Vagrantfile
├── common
├── common-lab-setup-instructions.md
├── hardware_software_requirements.md
├── hardware_software_requirements_ansible.md
├── hardware_software_requirements_devops.md
├── lab-setup-vagrant-vbox-only.md
└── vagrant-cheat-sheet.md
├── devops
└── labsetup
│ └── devops-workshop-lab-setup-instructions.md
├── docker
├── labsetup
│ ├── devops-workshop-lab-setup-instructions.md
│ ├── docker-cluster.md
│ ├── docker-lab-setup-instructions.md
│ └── docker_vm_env.md
└── vagrant-docker-cluster
│ ├── Vagrantfile
│ ├── hosts
│ └── setup-nfs.sh
├── images
├── .DS_Store
├── Conemu.PNG
├── atom.PNG
├── chef.PNG
├── git-deskstop.PNG
├── lan-chef.png
├── lan-puppet.png
├── vagrant.PNG
└── virtualbox.PNG
├── kubernetes
├── vagrant-kube-cluster
│ ├── Vagrantfile
│ ├── hosts
│ ├── kubernetes.list
│ └── setup-nfs.sh
├── vagrant-minikube
│ ├── README.md
│ └── Vagrantfile
└── vagrant-nfs
│ ├── Vagrantfile
│ └── setup-nfs.sh
├── puppet-chef
└── puppet-chef-lab-setup-instructions.md
└── puppet
├── labsetup
├── modules
│ ├── .DS_Store
│ ├── labsetup_mac
│ │ ├── README.md
│ │ └── manifests
│ │ │ └── init.pp
│ └── labsetup_windows
│ │ ├── .DS_Store
│ │ ├── README.md
│ │ ├── file
│ │ └── sample.txt
│ │ └── manifests
│ │ └── init.pp
└── puppet-lab-setup-instructions.md
└── virtual
└── nodes
└── Vagrantfile
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/schoolofdevops/lab-setup/69753e61d45934febd7ee020d2350b42c8dc5794/.DS_Store
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Lab Setup Instructions
2 | Lab Setup Instructions for Devops Trainings conducted by School of Devops.
3 |
4 | ## Common Resources
5 |
6 | * [Hardware and Software Pre Requisites](https://github.com/schoolofdevops/lab-setup/blob/master/common/hardware_software_requirements.md)
7 |
8 | * [Hardware and Software Pre Requisites for Devops Workshop](https://github.com/schoolofdevops/lab-setup/blob/master/common/hardware_software_requirements_devops.md)
9 |
10 |
11 | * [Common Lab Setup Instructions](https://github.com/schoolofdevops/lab-setup/blob/master/common/common-lab-setup-instructions.md)
12 |
13 | ## Tool/Training Specific Instructions
14 |
15 | * [Lab Setup Instructions for Chef Fundamentals](https://github.com/schoolofdevops/lab-setup/blob/master/chef/labsetup/chef-lab-setup-instructions.md)
16 |
17 | * [Lab Setup Instructions for Puppet Fundamentals](https://github.com/schoolofdevops/lab-setup/blob/master/puppet/labsetup/puppet-lab-setup-instructions.md)
18 |
19 | * [Lab Setup Instructions for Puppet and Chef Fundamentals Combined](https://github.com/schoolofdevops/lab-setup/blob/master/puppet-chef/puppet-chef-lab-setup-instructions.md)
20 |
21 | * [Lab Setup Instructions for Devops Workshop](https://github.com/schoolofdevops/lab-setup/blob/master/devops/labsetup/devops-workshop-lab-setup-instructions.md)
22 |
23 | * [Lab Setup Instructions for Docker](https://github.com/schoolofdevops/lab-setup/blob/master/docker/labsetup/docker-lab-setup-instructions.md)
24 |
25 | * [Lab Setup Instructions for Docker Advanced](docker/labsetup/docker-cluster.md)
26 |
27 | * [Lab Setup Instructions for Docker - Offline Version ](https://github.com/schoolofdevops/lab-setup/blob/master/docker/labsetup/docker_vm_env.md)
28 |
29 | ### License (CC-BY-NC-ND)
30 |
31 | 
Lab Setup Instructions by School of Devops is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
32 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/basic-format.md:
--------------------------------------------------------------------------------
1 | #Lab Setup Instructions
2 |
3 | ###Requirements:-
4 | **1.Virtualbox**
5 |
6 | **2. Vagrant**
7 |
8 | **3. Git**
9 |
10 | **4. Atom editor**
11 |
12 | **5. Conemu**
13 |
14 | ###1. Virtualbox step by step installation:-
15 | **For Windows**
16 |
17 | 1. Download virtualbox:- Download virtualbox binaries from official virtualbox site for windows machine depending on 32bit/64bit configuration.
18 |
19 | [Virtualbox Download](https://www.virtualbox.org/wiki/Downloads)
20 |
21 | 
22 |
23 |
24 | 2. Once virtualbox executable is downloaded double click on.This will display installation welcome dialog box this will allow you to choose where to install virtualbox & additional virtualbox applications.
25 | Choose default configuration & follow the instructions this will install virtualbox on your windows machine.
26 |
27 | **For mac os**
28 |
29 | 1. Download Virtualbox .dmg file suitable to your mac os version.
30 | 2. Double click on the downloaded file, a windows will appear telling you to double click on "virtualbox.mpkg" file display on that window.
31 | 3. This start installer, allow you to choose where to install virtualbox. once it is done virtualbox icon appear in your application folder.
32 |
33 | ###2. Vagrant installation:-
34 |
35 | 1. Installing vagrant is simple visit official vagarnt download page, depending on your host machine choose package & download it.
36 |
37 | [Vagrant Download](https://www.vagrantup.com/downloads.html)
38 | 
39 |
40 | 2. It automatically add vagrant to your system path, if not then logged out once & logged in it will be their.
41 |
42 | ###3. Git Installation:-
43 |
44 | 1. To install git on windows visit page
45 |
46 | [Git Executable Download For Windows](https://git-scm.com/download/win)
47 |
48 | this will directly start download git for windows.
49 |
50 | 2. Other way is to download github which provide both GUI & command line interface. It aslo work well with powershell. you can download github from here -
51 |
52 | [Github Deskstop For windows](http://windows.github.com)
53 |
54 | 
55 |
56 | ###4. Atom Editor:-
57 |
58 | 1. To download Atom editor visit
59 |
60 | [Atom editor download](https://atom.io/)
61 |
62 | 
63 |
64 | select your package depends on your system from more packages & download appropriate one.
65 |
66 | [Windows exe](https://github.com/atom/atom/releases/download/v1.7.4/AtomSetup.exe)
67 |
68 | [Windows zip package](https://github.com/atom/atom/releases/download/v1.7.4/atom-windows.zip)
69 |
70 | [mac zip package](https://github.com/atom/atom/releases/download/v1.7.4/atom-mac.zip)
71 |
72 | ###5. Conemu Installation:-
73 |
74 | 1. Is a windows console emulator with multiple tabs.
75 | 2. Easy to download with .exe file or using zip package depends on system architecture.
76 | 3. reuirement windows 2000 or later
77 |
78 | exe package:-
79 | [ConEmu Download exe](http://www.fosshub.com/ConEmu.html/ConEmuSetup.150813g.exe)
80 |
81 | zip package:-
82 | [ConEmu Download zip](http://www.fosshub.com/ConEmu.html/ConEmuPack.150813g.7z)
83 |
84 | 
85 |
86 |
87 | ###Additional Softwares:
88 |
89 | **Chef**
90 |
91 | [Download chef development kit](https://downloads.chef.io/chef-dk/)
92 |
93 | You can download chef development kit depending on your OS:-
94 |
95 | 
96 |
97 |
--------------------------------------------------------------------------------
/chef/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/schoolofdevops/lab-setup/69753e61d45934febd7ee020d2350b42c8dc5794/chef/.DS_Store
--------------------------------------------------------------------------------
/chef/labsetup/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/schoolofdevops/lab-setup/69753e61d45934febd7ee020d2350b42c8dc5794/chef/labsetup/.DS_Store
--------------------------------------------------------------------------------
/chef/labsetup/chef-lab-setup-instructions.md:
--------------------------------------------------------------------------------
1 | # Lab Setup Instructions - Chef
2 | ====================
3 |
4 | ### Target Audience
5 |
6 | This introductory course is targeted for the budding devops professionals, experienced sysadmins and enthusiasts alike who are already using puppet, or intend to use it to automate configuration management, system integration and manage scalable infrastructures with ease.
7 |
8 | ### Prerequisites:
9 | * Basic understanding of linux/unix system concepts
10 | * Familiarity with Command Line Interface (CLI)
11 | * Familiarity with a Text Editor
12 |
13 |
14 | #### System Prerequisites : Hardware and Software
15 |
16 | Refer to [Hardware and Software Pre Requisites](../../common/hardware_software_requirements.md) page.
17 |
18 |
19 | ### Systems Preparation
20 | 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).
21 |
22 |
23 | #### Additional Softwares
24 |
25 | * Download and install [Chef Development Kit](https://downloads.getchef.com/chef-dk/)
26 |
27 | #### Install Chef Plugin for Atom
28 | * Open Atom editor
29 | * On OS X, select **Atom** -> **Preferences**. On Windows **File** -> **Settings**
30 | * From **Install**, Search for **language-chef** and install the extension.
31 | * Restart Atom
32 | 
33 |
--------------------------------------------------------------------------------
/chef/labsetup/cookbooks/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/schoolofdevops/lab-setup/69753e61d45934febd7ee020d2350b42c8dc5794/chef/labsetup/cookbooks/.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/.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/.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/.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 |
--------------------------------------------------------------------------------
/chef/labsetup/cookbooks/labsetup/Berksfile:
--------------------------------------------------------------------------------
1 | source 'https://supermarket.chef.io'
2 |
3 | metadata
4 |
--------------------------------------------------------------------------------
/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/labsetup/cookbooks/labsetup/attributes/default.rb:
--------------------------------------------------------------------------------
1 | case node['platform_family']
2 | when 'windows'
3 | default['labsetup']['path'] = "C:\\"
4 | default['labsetup']['atom_url'] = "https://github.com/atom/atom/releases/download/v1.7.3/AtomSetup.exe"
5 | default['labsetup']['atom_display_name'] = "AtomSetup"
6 | default['labsetup']['git_version'] = "1.8.0-preview20121022"
7 | default['labsetup']['git_url'] = "http://github.com/downloads/msysgit/git/Git-#{node['labsetup']['git_version']}.exe"
8 | default['labsetup']['git_checksum'] = "8ec19d04912fd27d7350823c857a4807b550fa63a3744bf6fd2841de8cfa9a0f"
9 | default['labsetup']['git_display_name'] = "Git-#{ node['labsetup']['git_version'] }"
10 | default['labsetup']['virtualbox_version'] = "5.0.20-106931-Win"
11 | default['labsetup']['virtualbox_url'] = 'http://download.virtualbox.org/virtualbox/5.0.20/VirtualBox-5.0.20-106931-Win.exe'
12 | default['labsetup']['virtualbox_checksum'] = "4f167b0967e3c2283eef986b8ffa3fec82390cd79038568eae3ca65c6ab4c294"
13 | default['labsetup']['virtualbox_display_name'] = "Virtualbox-#{ node['labsetup']['virtualbox_version'] }"
14 | default['labsetup']['vagrant_msi_version'] = '1.8.1'
15 | default['labsetup']['vagrant_url'] = "https://releases.hashicorp.com/vagrant/1.8.1/vagrant_1.8.1.msi"
16 | default['labsetup']['vagrant_checksum'] = "6468cc140f6f236c3ac4bc0bbb1cc2177114249bc344e0aba8c826eae9cc6eb2"
17 | default['labsetup']['vagrant_display_name'] = "Vagrant_#{ node['labsetup']['vagrant_msi_version'] }"
18 |
19 | when 'mac_os_x'
20 | default['labsetup']['var'] = "variable"
21 |
22 | end
--------------------------------------------------------------------------------
/chef/labsetup/cookbooks/labsetup/chefignore:
--------------------------------------------------------------------------------
1 | # Put files/directories that should be ignored in this file when uploading
2 | # to a chef-server or supermarket.
3 | # Lines that start with '# ' are comments.
4 |
5 | # OS generated files #
6 | ######################
7 | .DS_Store
8 | Icon?
9 | nohup.out
10 | ehthumbs.db
11 | Thumbs.db
12 |
13 | # SASS #
14 | ########
15 | .sass-cache
16 |
17 | # EDITORS #
18 | ###########
19 | \#*
20 | .#*
21 | *~
22 | *.sw[a-z]
23 | *.bak
24 | REVISION
25 | TAGS*
26 | tmtags
27 | *_flymake.*
28 | *_flymake
29 | *.tmproj
30 | .project
31 | .settings
32 | mkmf.log
33 |
34 | ## COMPILED ##
35 | ##############
36 | a.out
37 | *.o
38 | *.pyc
39 | *.so
40 | *.com
41 | *.class
42 | *.dll
43 | *.exe
44 | */rdoc/
45 |
46 | # Testing #
47 | ###########
48 | .watchr
49 | .rspec
50 | spec/*
51 | spec/fixtures/*
52 | test/*
53 | features/*
54 | examples/*
55 | Guardfile
56 | Procfile
57 | .kitchen*
58 | .rubocop.yml
59 | spec/*
60 | Rakefile
61 | .travis.yml
62 | .foodcritic
63 | .codeclimate.yml
64 |
65 | # SCM #
66 | #######
67 | .git
68 | */.git
69 | .gitignore
70 | .gitmodules
71 | .gitconfig
72 | .gitattributes
73 | .svn
74 | */.bzr/*
75 | */.hg/*
76 | */.svn/*
77 |
78 | # Berkshelf #
79 | #############
80 | Berksfile
81 | Berksfile.lock
82 | cookbooks/*
83 | tmp
84 |
85 | # Cookbooks #
86 | #############
87 | CONTRIBUTING*
88 | CHANGELOG*
89 | TESTING*
90 | MAINTAINERS.toml
91 |
92 | # Strainer #
93 | ############
94 | Colanderfile
95 | Strainerfile
96 | .colander
97 | .strainer
98 |
99 | # Vagrant #
100 | ###########
101 | .vagrant
102 | Vagrantfile
103 |
--------------------------------------------------------------------------------
/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/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/atom-windows.rb:
--------------------------------------------------------------------------------
1 | #
2 | # Cookbook Name:: labsetup
3 | # Recipe:: atom-windows
4 | #
5 | # Copyright (c) 2016 The Authors, All Rights Reserved.
6 | windows_package node['labsetup']['atom_display_name'] do
7 | not_if do
8 | File.exist?("#{node['labsetup']['path']}#{node['labsetup']['atom_display_name']}.exe")
9 | end
10 | action :install
11 | source node['labsetup']['atom_url']
12 | remote_file_attributes ({
13 | :path => "#{node['labsetup']['path']}#{node['labsetup']['atom_display_name']}.exe"
14 | })
15 | installer_type :inno
16 | end
17 |
--------------------------------------------------------------------------------
/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
--------------------------------------------------------------------------------
/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
--------------------------------------------------------------------------------
/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-mac.rb:
--------------------------------------------------------------------------------
1 | #
2 | # Cookbook Name:: labsetup
3 | # Recipe:: vagrant-mac
4 | #
5 | # Copyright (c) 2016 The Authors, All Rights Reserved.
6 |
7 | ##download vagrant dmg file
8 | execute 'vagrant download' do
9 | cwd '/tmp'
10 | command '/usr/local/bin/wget https://releases.hashicorp.com/vagrant/1.8.1/vagrant_1.8.1.dmg'
11 | creates '/tmp/vagrant_1.8.1.dmg'
12 | # #not_if 'pkgutil --packages | grep vagrant || brew cask list | grep vagrant'
13 | end
14 |
15 | ##create volume to convert dmg to pkg package
16 | execute 'create vagrant volume' do
17 | cwd '/tmp'
18 | command 'hdiutil attach vagrant_1.8.1.dmg'
19 | creates '/Volumes/Vagrant/Vagrant.pkg'
20 | # #not_if { File.exist?("/tmp/vagrant_1.8.1.dmg") }
21 | end
22 |
23 | ##install vagrant pkg package
24 | execute 'install vagrant' do
25 | cwd '/Volumes/Vagrant'
26 | command "sudo installer -pkg Vagrant.pkg -target '/'"
27 | creates '/Volumes/Vagrant/Vagrant.txt'
28 | not_if 'pkgutil --packages | grep vagrant'
29 | end
30 |
31 | ##installvagrant with brew cask , only latest package install by default
32 | #execute 'vagrant install' do
33 | # command 'brew install cask vagrant'
34 | # not_if 'pkgutil --packages | grep vagrant || brew cask list | grep vagrant || brew list | grep vagrant'
35 | #end
--------------------------------------------------------------------------------
/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-mac.rb:
--------------------------------------------------------------------------------
1 | #
2 | # Cookbook Name:: labsetup
3 | # Recipe:: virtualbox-mac
4 | #
5 | # Copyright (c) 2016 The Authors, All Rights Reserved.
6 |
7 | ##download vagrant dmg file
8 | execute 'virtualbox-mac download' do
9 | cwd '/tmp'
10 | command '/usr/local/bin/wget https://releases.hashicorp.com/vagrant/1.8.1/vagrant_1.8.1.dmg'
11 | creates '/tmp/vagrant_1.8.1.dmg'
12 | # #not_if 'pkgutil --packages | grep virtualbox || brew cask list | grep virtualbox || brew list virtualbox'
13 | end
14 |
15 | ##create volume to convert dmg to pkg package
16 | execute 'create virtualbox-mac volume' do
17 | cwd '/tmp'
18 | command 'hdiutil attach vagrant_1.8.1.dmg'
19 | creates '/Volumes/Vagrant/Vagrant.pkg'
20 | #not_if 'pkgutil --packages | grep virtualbox || brew cask list | grep virtualbox || brew list | grep virtualbox'
21 | end
22 |
23 | ##install vagrant pkg package
24 | execute 'install virtualbox-mac' do
25 | cwd '/Volumes/Vagrant'
26 | command "sudo installer -pkg Vagrant.pkg -target '/'"
27 | creates '/Volumes/Vagrant/Vagrant.txt'
28 | not_if 'pkgutil --packages | grep virtualbox'
29 | end
30 |
31 | ##installvagrant with brew cask , only latest package install by default
32 | #execute 'virtualbox install' do
33 | # command 'brew install cask virtualbox'
34 | # not_if 'pkgutil --packages | grep virtualbox || brew cask list | grep virtualbox || brew list | grep virtualbox'
35 | #end
--------------------------------------------------------------------------------
/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
--------------------------------------------------------------------------------
/chef/labsetup/cookbooks/labsetup/spec/spec_helper.rb:
--------------------------------------------------------------------------------
1 | require 'chefspec'
2 | require 'chefspec/berkshelf'
3 |
--------------------------------------------------------------------------------
/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-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-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/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/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/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/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 |
--------------------------------------------------------------------------------
/chef/virtual/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/schoolofdevops/lab-setup/69753e61d45934febd7ee020d2350b42c8dc5794/chef/virtual/.DS_Store
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/chef/virtual/ws/Vagrantfile:
--------------------------------------------------------------------------------
1 | # -*- mode: ruby -*-
2 | # vi: set ft=ruby :
3 |
4 | Vagrant.configure(2) do |config|
5 |
6 | config.vm.box = "chef"
7 | config.vm.hostname = "chef-ws"
8 | config.vm.network "private_network", ip: "192.168.8.10"
9 |
10 | config.vm.provider "virtualbox" do |vb|
11 | # # Display the VirtualBox GUI when booting the machine
12 | # vb.gui = true
13 | #
14 | # # Customize the amount of memory on the VM:
15 | vb.memory = "512"
16 | end
17 |
18 | end
19 |
--------------------------------------------------------------------------------
/ci/virtual/Vagrantfile:
--------------------------------------------------------------------------------
1 | # -*- mode: ruby -*-
2 | # vi: set ft=ruby :
3 |
4 | Vagrant.configure(2) do |config|
5 | config.vm.box = "devops"
6 | config.vm.hostname = "ci"
7 |
8 | config.vm.network "private_network", ip: "192.168.9.10"
9 |
10 | config.vm.provider "virtualbox" do |vb|
11 | vb.customize ["modifyvm", :id, "--memory", "3000"]
12 | vb.customize ["modifyvm", :id, "--cpus", "2"]
13 | end
14 |
15 |
16 | # config.vm.provision "shell", inline: <<-SHELL
17 | # sudo apt-get update
18 | # sudo apt-get install -y apache2
19 | # SHELL
20 | end
21 |
--------------------------------------------------------------------------------
/common/common-lab-setup-instructions.md:
--------------------------------------------------------------------------------
1 | ## Common Setup Instructions
2 | #### Softwares
3 |
4 | * Docker Desktop
5 | * Virtualbox
6 | * Vagrant
7 | * Git
8 | * Atom
9 | * ConEMU
10 |
11 | ====================
12 |
13 |
14 | ### Systems Preparation
15 |
16 | To setup the lab, as participants, we would create Virtual Machines with VirtualBox and setup the learning environment. Vagrant is a tool which allows us to build, configure and setup portable virtual machines automatically, and it works with multitude of hypervisors, Virtualbox included. We would also need a sophisticated editor with chef plugin, which would help us write code fast, with auto completion and syntax highlighting features etc. Thats where Atom comes in handy.
17 |
18 | On windows systems, utilities such as ssh do not come installed by default. To install a bash shell and create a remote terminal, Git and ConEmu are effective tools.
19 |
20 |
21 | #### Enabling Virtualization from BIOS
22 |
23 | In order to run 64bit VMs, systems need to be enabled with hardware virtualization extensions. On a Mac OSX, this is typically enabled by default. However, on many Windows Laptops/Desktops, VT-x needs to be manually enabled.
24 |
25 | [Enable Hardware Virtualization Technology(VT -x) from BIOS](https://docs.fedoraproject.org/en-US/Fedora/13/html/Virtualization_Guide/sect-Virtualization-Troubleshooting-Enabling_Intel_VT_and_AMD_V_virtualization_hardware_extensions_in_BIOS.html)
26 |
27 | These instructions different from system to system, bases on the BIOS provided with your laptop/desktop. For a lot of systems, Virtualization options are found in **Security** tab.
28 |
29 | #### Installing Required Softwares - Common
30 |
31 | - Install software with specific version by clicking on link provided in below table
32 |
33 | - Additional software need for windows system are git & ConEmu
34 |
35 |
36 | | Software | Windows Installer | OS X Installer |
37 | | :------------- | :--------------- | :---------------|
38 | | Docker Desktop | [install_link](https://www.docker.com/products/docker-desktop) | [install_link](https://www.docker.com/products/docker-desktop) |
39 | | Virtualbox |[6.0.12](https://download.virtualbox.org/virtualbox/6.0.12/VirtualBox-6.0.12-133076-Win.exe) | [6.0.12](https://download.virtualbox.org/virtualbox/6.0.12/VirtualBox-6.0.12-133076-OSX.dmg) |
40 | | Vagrant | [2.2.5](https://releases.hashicorp.com/vagrant/2.2.5/vagrant_2.2.5_x86_64.msi) | [2.2.5](https://releases.hashicorp.com/vagrant/2.2.5/vagrant_2.2.5_x86_64.dmg) |
41 | | Atom | [1.7.4](https://github.com/atom/atom/releases/download/v1.7.4/AtomSetup.exe) | [1.7.4](https://atom.io/download/mac) |
42 | | Git for Windows | [2.8.3](https://github.com/git-for-windows/git/releases/download/v2.8.3.windows.1/Git-2.8.3-64-bit.exe) | Not Applicable |
43 | | ConEmu | [150813g](http://www.fosshub.com/ConEmu.html/ConEmu_150813g_English.paf.exe) | Not Applicable |
44 |
45 | All softwares except Virtualbox on Windows need no additional instructions while installing. Download, launch installer and follow through the default steps. Installing Virtualbox on Windows however needs special instructions due to NDIS/Network driver caveat.
46 |
47 | ##### VirtualBox 5.x installation on Windows
48 |
49 | The newer version of Virtualbox installs NDIS6 driver by default, which creates conflicts with vagrant while bringing up the virtual machines and network interfaces. [Description of this problem and solution is here](https://forums.virtualbox.org/viewtopic.php?f=6&t=69597). To avoid this, participants need to install Virtualbox with NDIS5 with the following instructions.
50 |
51 | **Note:** this issue is specific to Windows only. Same version of Virtualbox on Mac/OSX works flawlessly.
52 |
53 | Open a command line terminal /git bash, change directory to where you have downloaded the installer and run it as
54 |
55 | ```
56 | VirtualBox-x.x.x-yyyyy-Win.exe -msiparams NETWORKTYPE=NDIS5
57 |
58 | ```
59 |
60 | Above command will launch Virtualbox installer as usual, however, it will use NDIS5, which works without flaws while configuring network interfaces.
61 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/common/lab-setup-vagrant-vbox-only.md:
--------------------------------------------------------------------------------
1 | ## Common Setup Instructions
2 | #### Softwares
3 |
4 | * Virtualbox
5 | * Vagrant
6 |
7 | ====================
8 |
9 |
10 | ### Systems Preparation
11 |
12 | To setup the lab, as participants, we would create Virtual Machines with VirtualBox and setup the learning environment. Vagrant is a tool which allows us to build, configure and setup portable virtual machines automatically, and it works with multitude of hypervisors, Virtualbox included. We would also need a sophisticated editor with chef plugin, which would help us write code fast, with auto completion and syntax highlighting features etc. Thats where Atom comes in handy.
13 |
14 | On windows systems, utilities such as ssh do not come installed by default. To install a bash shell and create a remote terminal, Git and ConEmu are effective tools.
15 |
16 |
17 | #### Enabling Virtualization from BIOS
18 |
19 | In order to run 64bit VMs, systems need to be enabled with hardware virtualization extensions. On a Mac OSX, this is typically enabled by default. However, on many Windows Laptops/Desktops, VT-x needs to be manually enabled.
20 |
21 | [Enable Hardware Virtualization Technology(VT -x) from BIOS](https://docs.fedoraproject.org/en-US/Fedora/13/html/Virtualization_Guide/sect-Virtualization-Troubleshooting-Enabling_Intel_VT_and_AMD_V_virtualization_hardware_extensions_in_BIOS.html)
22 |
23 | These instructions different from system to system, bases on the BIOS provided with your laptop/desktop. For a lot of systems, Virtualization options are found in **Security** tab.
24 |
25 | #### Installing Required Softwares - Common
26 |
27 | - Install software with specific version by clicking on link provided in below table
28 |
29 | - Additional software need for windows system are git & ConEmu
30 |
31 |
32 | | Software | Windows Installer | OS X Installer |
33 | | :------------- | :--------------- | :---------------|
34 | | Virtualbox |[5.2.10](https://download.virtualbox.org/virtualbox/5.2.10/VirtualBox-5.2.10-122406-Win.exe) | [5.2.10](https://download.virtualbox.org/virtualbox/5.2.10/VirtualBox-5.2.10-122088-OSX.dmg)
35 | | Vagrant | [2.1.1](https://releases.hashicorp.com/vagrant/2.1.1/vagrant_2.1.1_x86_64.msi) | [2.1.1](https://releases.hashicorp.com/vagrant/2.1.1/vagrant_2.1.1_x86_64.dmg) |
36 |
37 | All softwares except Virtualbox on Windows need no additional instructions while installing. Download, launch installer and follow through the default steps. Installing Virtualbox on Windows however needs special instructions due to NDIS/Network driver caveat.
38 |
39 | Following are the instructions on installing VirtualBox on Windows and on Mac
40 |
41 | [Installing VirtualBox on Windows 10](https://www.youtube.com/watch?v=63_kPIQUPp8)
42 |
43 | [Installing VirtualBox on Mac OSX](https://www.youtube.com/watch?v=lEvM-No4eQo)
44 |
45 |
46 | ##### VirtualBox 5.x installation on Windows Caveats
47 |
48 | The newer version of Virtualbox installs NDIS6 driver by default, which creates conflicts with vagrant while bringing up the virtual machines and network interfaces. [Description of this problem and solution is here](https://forums.virtualbox.org/viewtopic.php?f=6&t=69597). To avoid this, participants need to install Virtualbox with NDIS5 with the following instructions.
49 |
50 | **Note:** this issue is specific to Windows only. Same version of Virtualbox on Mac/OSX works flawlessly.
51 |
52 | Open a command line terminal /git bash, change directory to where you have downloaded the installer and run it as
53 |
54 | ```
55 | VirtualBox-x.x.x-yyyyy-Win.exe -msiparams NETWORKTYPE=NDIS5
56 |
57 | ```
58 |
59 | Above command will launch Virtualbox installer as usual, however, it will use NDIS5, which works without flaws while configuring network interfaces.
60 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/devops/labsetup/devops-workshop-lab-setup-instructions.md:
--------------------------------------------------------------------------------
1 | ## Common Setup Instructions
2 | #### Softwares
3 |
4 | * Docker Toolbox
5 | * Git
6 | * Atom
7 | * ConEMU
8 |
9 | ====================
10 |
11 |
12 | ### Systems Preparation
13 |
14 | To setup the lab, as participants, we would install Docker Toolbox and create Containers for each application being used to setup learning environment. We would also need a sophisticated editor which would help us write code fast, with auto completion and syntax highlighting features etc. Thats where Atom comes in handy.
15 |
16 | On windows systems, utilities such as ssh do not come installed by default. To install a bash shell and create a remote terminal, Git and ConEmu are effective tools.
17 |
18 | #### Enabling Virtualization from BIOS
19 |
20 | In order to run 64bit VMs, systems need to be enabled with hardware virtualization extensions. On a Mac OSX, this is typically enabled by default. However, on many Windows Laptops/Desktops, VT-x needs to be manually enabled.
21 |
22 |
23 | #### Installing Required Softwares - Common
24 |
25 | - Install software with specific version by clicking on link provided in below table
26 |
27 | - Additional software need for windows system are git & ConEmu
28 |
29 |
30 | | Software | Windows Installer | OS X Installer |
31 | | :------------- | :--------------- | :---------------|
32 | | Docker Toolbox |[1.12.3](https://github.com/docker/toolbox/releases/tag/v1.12.3) | [1.12.3](https://github.com/docker/toolbox/releases/tag/v1.12.3)
33 | | Atom | [1.7.4](https://github.com/atom/atom/releases/download/v1.7.4/AtomSetup.exe) | [1.7.4](https://atom.io/download/mac) |
34 | | Git for Windows | [2.8.3](https://github.com/git-for-windows/git/releases/download/v2.8.3.windows.1/Git-2.8.3-64-bit.exe) | Not Applicable |
35 | | ConEmu | [150813g](http://www.fosshub.com/ConEmu.html/ConEmu_150813g_English.paf.exe) | Not Applicable |
36 |
37 | All softwares need no additional instructions while installing. Download, launch installer and follow through the default steps.
38 |
39 | ### Creating a VM to launch Docker Containers
40 |
41 | * Open a terminal (ConEMU with bash on windows or iterm on Mac)
42 | * Run the following command to create a new VM with VirtualBox driver
43 |
44 | ```
45 | docker-machine create -d virtualbox cmad
46 |
47 | ```
48 |
49 | * Once the VM is created, setup the environment with docker in order to connect to it and launch containers.
50 |
51 | ```
52 | docker-machine env cmad
53 | ```
54 |
55 | Executing above command will actually give you the actual instructions to setup environment.
56 |
57 | e.g.
58 |
59 | ```
60 | # Run this command to configure your shell:
61 | # eval $(docker-machine env cmad)
62 | ```
63 |
64 | You need to follow those instructions and execute the command given e.g.
65 |
66 | ```
67 | eval $(docker-machine env cmad)
68 |
69 | ```
70 |
71 |
72 | * Validate connectivity to docker daemon. The following command can show blank results, but should not throw an error.
73 |
74 | ```
75 | docker images
76 | REPOSITORY TAG IMAGE ID CREATED SIZE
77 | ```
78 |
79 | You are ready to launch/manage container based environments.
80 |
81 |
82 | ### Download Docker images
83 |
84 |
85 | Run the following commands to download the necessary images
86 |
87 | ```
88 | docker pull jenkins
89 | docker pull sonarqube
90 | docker pull mattgruter/artifactory
91 | docker pull tomcat
92 | ```
93 |
--------------------------------------------------------------------------------
/docker/labsetup/devops-workshop-lab-setup-instructions.md:
--------------------------------------------------------------------------------
1 | ## Setup Instructions - Docker
2 | #### Softwares
3 |
4 | * Docker Toolbox
5 | * Git
6 | * Atom
7 | * ConEMU
8 |
9 | ====================
10 |
11 |
12 | ### Systems Preparation
13 |
14 | To setup the lab, as participants, we would install Docker Toolbox and create Containers for each application being used to setup learning environment. We would also need a sophisticated editor which would help us write code fast, with auto completion and syntax highlighting features etc. Thats where Atom comes in handy.
15 |
16 | On windows systems, utilities such as ssh do not come installed by default. To install a bash shell and create a remote terminal, Git and ConEmu are effective tools.
17 |
18 | #### Enabling Virtualization from BIOS
19 |
20 | In order to run 64bit VMs, systems need to be enabled with hardware virtualization extensions. On a Mac OSX, this is typically enabled by default. However, on many Windows Laptops/Desktops, VT-x needs to be manually enabled.
21 |
22 |
23 | #### Installing Required Softwares - Common
24 |
25 | - Install software with specific version by clicking on link provided in below table
26 |
27 | - Additional software need for windows system are git & ConEmu
28 |
29 |
30 | | Software | Windows Installer | OS X Installer |
31 | | :------------- | :--------------- | :---------------|
32 | | Docker Toolbox |[1.12.3](https://github.com/docker/toolbox/releases/tag/v1.12.3) | [1.12.3](https://github.com/docker/toolbox/releases/tag/v1.12.3)
33 | | Atom | [1.7.4](https://github.com/atom/atom/releases/download/v1.7.4/AtomSetup.exe) | [1.7.4](https://atom.io/download/mac) |
34 | | Git for Windows | [2.8.3](https://github.com/git-for-windows/git/releases/download/v2.8.3.windows.1/Git-2.8.3-64-bit.exe) | Not Applicable |
35 | | ConEmu | [150813g](http://www.fosshub.com/ConEmu.html/ConEmu_150813g_English.paf.exe) | Not Applicable |
36 |
37 | All softwares need no additional instructions while installing. Download, launch installer and follow through the default steps.
38 |
39 | ### Creating a VM to launch Docker Containers
40 |
41 | * Open a terminal (ConEMU with bash on windows or iterm on Mac)
42 | * Run the following command to create a new VM with VirtualBox driver
43 |
44 | ```
45 | docker-machine create -d virtualbox docker-01
46 |
47 | ```
48 |
49 | * Once the VM is created, setup the environment with docker in order to connect to it and launch containers.
50 |
51 | ```
52 | docker-machine env docker-01
53 | ```
54 |
55 | Executing above command will actually give you the actual instructions to setup environment.
56 |
57 | e.g.
58 |
59 | ```
60 | # Run this command to configure your shell:
61 | # eval $(docker-machine env docker-01)
62 | ```
63 |
64 | You need to follow those instructions and execute the command given e.g.
65 |
66 | ```
67 | eval $(docker-machine env docker-01)
68 |
69 | ```
70 |
71 |
72 | * Validate connectivity to docker daemon. The following command can show blank results, but should not throw an error.
73 |
74 | ```
75 | docker images
76 | REPOSITORY TAG IMAGE ID CREATED SIZE
77 | ```
78 |
79 | You are ready to launch/manage container based environments.
80 |
81 |
82 | ### Download Docker images
83 |
84 |
85 | Run the following commands to download the necessary images
86 |
87 | ```
88 | docker pull alpine
89 | ```
90 |
91 | Validate image is available
92 |
93 | ```
94 | docker images
95 |
96 | ```
97 |
98 | If you see alpine image in the list, you are all set up for the docker training.
99 |
--------------------------------------------------------------------------------
/docker/labsetup/docker-cluster.md:
--------------------------------------------------------------------------------
1 | # Docker Advanced - Lab Setup
2 |
3 | This guide would help you create a 3 node cluster with docker engine running on each. This is useful to learn advanced docker concepts such as orchestration, overlay networking spanning multiple nodes, troubleshooting techniques etc.
4 |
5 |
6 | ## Softwares to setup VMs
7 |
8 | Following are the softwares required to setup VMs locally on a desktop/laptop.
9 |
10 | * Virtualbox
11 | * Vagrant
12 |
13 | ====================
14 |
15 |
16 | ### Systems Preparation
17 |
18 | To setup the lab, as participants, we would create Virtual Machines with VirtualBox and setup the learning environment. Vagrant is a tool which allows us to build, configure and setup portable virtual machines automatically, and it works with multitude of hypervisors, Virtualbox included. We would also need a sophisticated editor with chef plugin, which would help us write code fast, with auto completion and syntax highlighting features etc. Thats where Atom comes in handy.
19 |
20 | On windows systems, utilities such as ssh do not come installed by default. To install a bash shell and create a remote terminal, Git and ConEmu are effective tools.
21 |
22 |
23 | #### Enabling Virtualization from BIOS
24 |
25 | In order to run 64bit VMs, systems need to be enabled with hardware virtualization extensions. On a Mac OSX, this is typically enabled by default. However, on many Windows Laptops/Desktops, VT-x needs to be manually enabled.
26 |
27 | [Enable Hardware Virtualization Technology(VT -x) from BIOS](https://docs.fedoraproject.org/en-US/Fedora/13/html/Virtualization_Guide/sect-Virtualization-Troubleshooting-Enabling_Intel_VT_and_AMD_V_virtualization_hardware_extensions_in_BIOS.html)
28 |
29 | These instructions different from system to system, bases on the BIOS provided with your laptop/desktop. For a lot of systems, Virtualization options are found in **Security** tab.
30 |
31 | #### Installing Required Softwares
32 |
33 | - Install software with specific version by clicking on link provided in below table
34 |
35 | - Additional software need for windows system are git & ConEmu
36 |
37 |
38 | | Software | Windows Installer | OS X Installer |
39 | | :------------- | :--------------- | :---------------|
40 | | Virtualbox |[5.2.10](https://download.virtualbox.org/virtualbox/5.2.10/VirtualBox-5.2.10-122406-Win.exe) | [5.2.10](https://download.virtualbox.org/virtualbox/5.2.10/VirtualBox-5.2.10-122088-OSX.dmg)
41 | | Vagrant | [2.1.1](https://releases.hashicorp.com/vagrant/2.1.1/vagrant_2.1.1_x86_64.msi) | [2.1.1](https://releases.hashicorp.com/vagrant/2.1.1/vagrant_2.1.1_x86_64.dmg) |
42 |
43 | All softwares except Virtualbox on Windows need no additional instructions while installing. Download, launch installer and follow through the default steps. Installing Virtualbox on Windows however needs special instructions due to NDIS/Network driver caveat.
44 |
45 | Following are the instructions on installing VirtualBox on Windows and on Mac
46 |
47 | [Installing VirtualBox on Windows 10](https://www.youtube.com/watch?v=63_kPIQUPp8)
48 |
49 | [Installing VirtualBox on Mac OSX](https://www.youtube.com/watch?v=lEvM-No4eQo)
50 |
51 |
52 | ##### VirtualBox 5.x installation on Windows Caveats
53 |
54 | The newer version of Virtualbox installs NDIS6 driver by default, which creates conflicts with vagrant while bringing up the virtual machines and network interfaces. [Description of this problem and solution is here](https://forums.virtualbox.org/viewtopic.php?f=6&t=69597). To avoid this, participants need to install Virtualbox with NDIS5 with the following instructions.
55 |
56 | **Note:** this issue is specific to Windows only. Same version of Virtualbox on Mac/OSX works flawlessly.
57 |
58 | Open a command line terminal /git bash, change directory to where you have downloaded the installer and run it as
59 |
60 | ```
61 | VirtualBox-x.x.x-yyyyy-Win.exe -msiparams NETWORKTYPE=NDIS5
62 |
63 | ```
64 |
65 | Above command will launch Virtualbox installer as usual, however, it will use NDIS5, which works without flaws while configuring network interfaces.
66 |
67 |
68 |
69 | ## Setting up VMs with Vagrant and VirtualBox
70 |
71 | To setup the VM cluster, first you should clone the code containing vagrant specs.
72 |
73 | ```
74 | git clone https://github.com/schoolofdevops/lab-setup.git
75 | ```
76 |
77 | Change into the directory which contains the Vagrantfile for setting up a 3 node docker cluster.
78 |
79 | ```
80 |
81 | cd lab-setup/vagrant-docker-cluster
82 | ```
83 |
84 | Observe the Vagrantfile and the configuration that it does. To launch all the nodes (3VMs) run the following command.
85 |
86 | ```
87 | vagrant up
88 | ```
89 |
90 | This should bring up all 3 nodes.
91 |
92 |
93 |
94 | ### Login to the nodes
95 |
96 | Open three different terminals to login to 3 nodes created with above command
97 |
98 | **Terminal 1**
99 | ```
100 | vagrant ssh docker-01
101 | sudo su
102 |
103 | ```
104 | **Terminal 2**
105 |
106 | ```
107 | vagrant ssh docker-02
108 | sudo su
109 | ```
110 |
111 | **Terminal 3**
112 |
113 | ```
114 | vagrant ssh docker-03
115 | sudo su
116 | ```
117 |
118 |
119 | ## Validate a Container Launch
120 |
121 | ```
122 | docker version
123 |
124 | docker run hello-world
125 | ```
126 |
--------------------------------------------------------------------------------
/docker/labsetup/docker-lab-setup-instructions.md:
--------------------------------------------------------------------------------
1 | ## Setup Instructions - Docker
2 | #### Softwares
3 |
4 | * Docker Toolbox
5 | * Git
6 | * Atom
7 | * ConEMU
8 |
9 | ====================
10 |
11 |
12 | ### Systems Preparation
13 |
14 | To setup the lab, as participants, we would install Docker Toolbox and create Containers for each application being used to setup learning environment. We would also need a sophisticated editor which would help us write code fast, with auto completion and syntax highlighting features etc. Thats where Atom comes in handy.
15 |
16 | On windows systems, utilities such as ssh do not come installed by default. To install a bash shell and create a remote terminal, Git and ConEmu are effective tools.
17 |
18 | #### Enabling Virtualization from BIOS
19 |
20 | In order to run 64bit VMs, systems need to be enabled with hardware virtualization extensions. On a Mac OSX, this is typically enabled by default. However, on many Windows Laptops/Desktops, VT-x needs to be manually enabled.
21 |
22 |
23 | #### Installing Required Softwares - Common
24 |
25 | - Install software with specific version by clicking on link provided in below table
26 |
27 | - Additional software need for windows system are git & ConEmu
28 |
29 |
30 | | Software | Windows Installer | OS X Installer |
31 | | :------------- | :--------------- | :---------------|
32 | | Docker Toolbox |[1.12.3](https://github.com/docker/toolbox/releases/tag/v1.12.3) | [1.12.3](https://github.com/docker/toolbox/releases/tag/v1.12.3)
33 | | Atom | [1.7.4](https://github.com/atom/atom/releases/download/v1.7.4/AtomSetup.exe) | [1.7.4](https://atom.io/download/mac) |
34 | | Git for Windows | [2.8.3](https://github.com/git-for-windows/git/releases/download/v2.8.3.windows.1/Git-2.8.3-64-bit.exe) | Not Applicable |
35 | | ConEmu | [150813g](http://www.fosshub.com/ConEmu.html/ConEmu_150813g_English.paf.exe) | Not Applicable |
36 |
37 | All softwares need no additional instructions while installing. Download, launch installer and follow through the default steps.
38 |
39 | ### Creating a VM to launch Docker Containers
40 |
41 | * Open a terminal (ConEMU with bash on windows or iterm on Mac)
42 | * Run the following command to create a new VM with VirtualBox driver
43 |
44 | ```
45 | docker-machine create -d virtualbox docker-01
46 |
47 | ```
48 |
49 | * Once the VM is created, setup the environment with docker in order to connect to it and launch containers.
50 |
51 | ```
52 | docker-machine env docker-01
53 | ```
54 |
55 | Executing above command will actually give you the actual instructions to setup environment.
56 |
57 | e.g.
58 |
59 | ```
60 | # Run this command to configure your shell:
61 | # eval $(docker-machine env docker-01)
62 | ```
63 |
64 | You need to follow those instructions and execute the command given e.g.
65 |
66 | ```
67 | eval $(docker-machine env docker-01)
68 |
69 | ```
70 |
71 |
72 | * Validate connectivity to docker daemon. The following command can show blank results, but should not throw an error.
73 |
74 | ```
75 | docker images
76 | REPOSITORY TAG IMAGE ID CREATED SIZE
77 | ```
78 |
79 | You are ready to launch/manage container based environments.
80 |
81 |
82 | ### Download Docker images
83 |
84 |
85 | Run the following commands to download the necessary images
86 |
87 | ```
88 | docker pull alpine
89 | ```
90 |
91 | Validate image is available
92 |
93 | ```
94 | docker images
95 |
96 | ```
97 |
98 | If you see alpine image in the list, you are all set up for the docker training.
99 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/docker/vagrant-docker-cluster/Vagrantfile:
--------------------------------------------------------------------------------
1 | # -*- mode: ruby -*-
2 | # vi: set ft=ruby :
3 |
4 | Vagrant.configure(2) do |config|
5 |
6 | config.vm.box = "ubuntu/xenial64"
7 |
8 | config.vm.define "docker-01" do |docker|
9 | docker.vm.hostname = "docker-01"
10 | docker.vm.network "private_network", ip: "192.168.22.10"
11 | config.vm.provider :virtualbox do |vb|
12 | vb.customize ["modifyvm", :id, "--memory", "2048"]
13 | vb.customize ["modifyvm", :id, "--cpus", "2"]
14 | end
15 | docker.vm.provision "shell", inline: $script
16 | end
17 |
18 | config.vm.define "docker-02" do |docker|
19 | docker.vm.hostname = "docker-02"
20 | docker.vm.network "private_network", ip: "192.168.22.11"
21 | config.vm.provider :virtualbox do |vb|
22 | vb.customize ["modifyvm", :id, "--memory", "2048"]
23 | vb.customize ["modifyvm", :id, "--cpus", "1"]
24 | end
25 | docker.vm.provision "shell", inline: $script
26 | end
27 |
28 | config.vm.define "docker-03" do |docker|
29 | docker.vm.hostname = "docker-03"
30 | docker.vm.network "private_network", ip: "192.168.22.12"
31 | config.vm.provider :virtualbox do |vb|
32 | vb.customize ["modifyvm", :id, "--memory", "2048"]
33 | vb.customize ["modifyvm", :id, "--cpus", "1"]
34 | end
35 | docker.vm.provision "shell", inline: $script
36 | end
37 |
38 | $script = <