-
Use the vagrantfile to spin up a stand alone chef server for older (or newer) versions.
-
This can be used to for:
- In-place upgrades from chef-server 12.x to 13.x on your local machine for POC testing
- Verifying migration steps from here, with the assumption the chef-server has nodes on it or chef-load was run.
- For migrations, two instances are required
- A need to have a chef-server of a specific version that is ephemeral
- Vagrant is installed. Download here
- Virtual Box is installed. Download here
- This code assumes you'll be using a
generic
image- For example,
vagrant box add generic/ubuntu1604
orvagrant box add generic/rhel6
- For example,
- A
vagrant box add
of the type of OS you want to install the chef server on has been executed- All free boxes can be found here
- The ip address
10.11.12.13
is not in use- Change the
BOX-IP
in thevagrantfile
if it is in use
- Change the
-
Chef Server Stand Alone Install & In-Place Upgrade
generic/rhel6
chef-server 12-17-15
chef-server 12-3-0
generic/rhel7
chef-server 13-2-0
generic/rhel8
chef-server 13-2-0
generic/ubuntu1604
chef-server 12-17-15
chef-server 12-3-0
generic/centos7
chef-server 12-17-15
generic/ubuntu1804
chef-server 13.2.0
-
Chef Server Migration -
generic/ubuntu1604
togeneric/ubuntu1804
,chef-server 12.17.15
tochef-server 13.2.0
- Update the
Vagrantfile
with theBOX
you want to use.- For example an Ubuntu box,
BOX=generic/ubuntu1604
- For example an Ubuntu box,
- Update the
CHEF_SERVER_VERSION
if desired - Go into the directory where the
Vagrantfile
is located and runvagrant up
- The script will:
- Install the Chef Server Version specified
- Create a user
vagrant
with the passwordvagrant
- Create a chef org called
vagrant-dev
- Place both the user and validator pem files in the home directory
- Assign the IP of
10.11.12.13
to the chef infra server on the private network- Update the
BOX_IP
if this IP address is in use on the network
- Update the
- No certificate is installed during this process. A cert warning will occur if trying to hit the front end.
- If configuring a
knife.rb
orconfig.rb
and a cert is not installed, add the following line:ssl_verify_mode :verify_none
- If configuring a
- To export .pem(s) on the local machine go into the directory where the
Vagrantfile
is and run:vagrant ssh -c "sudo cat /home/vagrant/vagrant-user.pem" > vagrant-user.pem
vagrant ssh -c "sudo cat /home/vagrant/vagrant-dev-validator.pem" > vagrant-dev-validator.pem
- In the same directory where the
Vagrantfile
is located, runvagrant ssh
- Once in, run
head -n1 /opt/opscode/version-manifest.txt
to verify the chef server version you expected to be installed is actually installed
-
Use centos unless a RHEL license is available to you/your organization.
-
For migrations, spin up two instances in two separate directories, make sure to change the IP address on one instance.