From 84ce4504cfcc1fc65393c4cee73d81e51088a72b Mon Sep 17 00:00:00 2001 From: Bill Wilcox Date: Wed, 18 Jul 2018 11:03:41 -0600 Subject: [PATCH 1/4] updated PE to 2018.1.2 --- scripts/masterbootstrap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/masterbootstrap.sh b/scripts/masterbootstrap.sh index 3f226ad..98720d8 100755 --- a/scripts/masterbootstrap.sh +++ b/scripts/masterbootstrap.sh @@ -4,7 +4,7 @@ hostname master.vm echo '192.168.50.4 master.vm master' >> /etc/hosts mkdir -p /etc/puppetlabs/puppet echo '*' > /etc/puppetlabs/puppet/autosign.conf -curl -Lo pe.archive 'https://pm.puppetlabs.com/puppet-enterprise/2017.3.5/puppet-enterprise-2017.3.5-el-7-x86_64.tar.gz' +curl -Lo pe.archive 'https://pm.puppetlabs.com/puppet-enterprise/2018.1.2/puppet-enterprise-2018.1.2-el-7-x86_64.tar.gz' tar -xf pe.archive cat > pe.conf <<-EOF { From 90107e2ce2ff87da7c442051b4f59459cf64d43a Mon Sep 17 00:00:00 2001 From: Bill Wilcox Date: Wed, 18 Jul 2018 11:05:26 -0600 Subject: [PATCH 2/4] Updated to add a gitlab guest and a replica guest for HA configurations --- Vagrantfile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Vagrantfile b/Vagrantfile index 5b6a4e1..a239609 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -31,4 +31,25 @@ Vagrant.configure("2") do |config| v.memory = 2048 end end + + config.vm.define "replica.vm" do |replica| + replica.vm.box = "centos/7" + replica.vm.hostname = "replica.vm" + replica.vm.network "private_network", ip: "192.168.50.7" + replica.vm.provision "shell", path: "scripts/replica.sh" + replica.vm.provider "virtualbox" do |v| + v.memory = 2048 + end + end + + config.vm.define "gitlab.vm" do |gitlab| + gitlab.vm.box = "centos/7" + gitlab.vm.hostname = "gitlab.vm" + gitlab.vm.network "private_network", ip: "192.168.50.8" + gitlab.vm.provision "shell", path: "scripts/linux_gitlab.sh" + gitlab.vm.provider "virtualbox" do |v| + v.memory = 2048 + end + end + end From 90a1bd58bec87bc1397664a6dd209c2aa8789324 Mon Sep 17 00:00:00 2001 From: Bill Wilcox Date: Wed, 18 Jul 2018 11:07:30 -0600 Subject: [PATCH 3/4] added scripts for replica and gitlab guests --- scripts/linux_gitlab.sh | 10 ++++++++++ scripts/replica.sh | 6 ++++++ 2 files changed, 16 insertions(+) create mode 100644 scripts/linux_gitlab.sh create mode 100644 scripts/replica.sh diff --git a/scripts/linux_gitlab.sh b/scripts/linux_gitlab.sh new file mode 100644 index 0000000..bc7a5f0 --- /dev/null +++ b/scripts/linux_gitlab.sh @@ -0,0 +1,10 @@ +#/bin/bash +set -ex +hostname gitlab.vm +echo '192.168.50.4 master.vm master' >> /etc/hosts +echo '192.168.50.8 gitlab.vm linux' >> /etc/hosts +curl -k https://master.vm:8140/packages/current/install.bash | bash +curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash +yum -y install gitlab-ce +sed -i 's/gitlab.example.com/gitlab.vm/g' /etc/gitlab/gitlab.rb +sudo gitlab-ctl reconfigure diff --git a/scripts/replica.sh b/scripts/replica.sh new file mode 100644 index 0000000..8b80332 --- /dev/null +++ b/scripts/replica.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -ex +hostname replica.vm +echo '192.168.50.4 master.vm master' >> /etc/hosts +echo '192.168.50.7 replica.vm replica' >> /etc/hosts +curl -k https://master.vm:8140/packages/current/install.bash | bash From ee4d9e36caf6f5c07d20c77dc146a44b0743e410 Mon Sep 17 00:00:00 2001 From: Bill Wilcox Date: Wed, 18 Jul 2018 11:10:56 -0600 Subject: [PATCH 4/4] updated to include info on gitlab and replica VMs --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1ba3792..27862fc 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ A very simple vagrant environment for getting up and running with Puppet Enterprise. -This repo provides you with a complete, yet simple environment that consists of a master (CentOS7), as well as a Linux (CentOS7) and Windows VM. +This repo provides you with a complete, yet simple environment that consists of a master (CentOS7), as well as a Linux (CentOS7) and Windows VM. It's been updated to add a VM running Gitlab and a separate VM for use as a replica in an HA configuration. -Shout out to Grace Andrews for putting this together! I have updated this fork to use Puppet Enterprise 2017.3.5. +Shout out to Grace Andrews for putting this together! I have updated this fork to use Puppet Enterprise 2018.1.2. ## Pre-Steps ## @@ -27,6 +27,10 @@ Once both are installed, you'll be able to do the following steps from your CLI: 'vagrant up /windows/' +'vagrant up /gitlab/' + +'vagrant up /replica/' + 'vagrant hosts list' **ssh into each box individually**