mirror of
https://github.com/farcasclaudiu/terraform-course.git
synced 2026-06-22 05:01:55 +03:00
jenkins-packer-demo updates
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
*/terraform.tfvars
|
*/terraform.tfvars
|
||||||
*/terraform.tfstate
|
*/terraform.tfstate
|
||||||
*/terraform.tfstate.backup
|
*/terraform.tfstate.backup
|
||||||
|
*/.terraform
|
||||||
*/mykey*
|
*/mykey*
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# volume setup
|
||||||
vgchange -ay
|
vgchange -ay
|
||||||
|
|
||||||
DEVICE_FS=`blkid -o value -s TYPE ${DEVICE}`
|
DEVICE_FS=`blkid -o value -s TYPE ${DEVICE}`
|
||||||
@@ -13,7 +14,28 @@ mkdir -p /var/lib/jenkins
|
|||||||
echo '/dev/data/volume1 /var/lib/jenkins ext4 defaults 0 0' >> /etc/fstab
|
echo '/dev/data/volume1 /var/lib/jenkins ext4 defaults 0 0' >> /etc/fstab
|
||||||
mount /var/lib/jenkins
|
mount /var/lib/jenkins
|
||||||
|
|
||||||
|
# install jenkins
|
||||||
wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
|
wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
|
||||||
echo "deb http://pkg.jenkins.io/debian-stable binary/" >> /etc/apt/sources.list
|
echo "deb http://pkg.jenkins.io/debian-stable binary/" >> /etc/apt/sources.list
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y jenkins=${JENKINS_VERSION}
|
apt-get install -y jenkins=${JENKINS_VERSION}
|
||||||
|
|
||||||
|
# install pip
|
||||||
|
wget -q https://bootstrap.pypa.io/get-pip.py
|
||||||
|
python get-pip.py
|
||||||
|
python3 get-pip.py
|
||||||
|
rm -f get-pip.py
|
||||||
|
# install awscli
|
||||||
|
pip install awscli
|
||||||
|
|
||||||
|
# install terraform
|
||||||
|
cd /usr/local/bin
|
||||||
|
wget -q https://releases.hashicorp.com/terraform/0.7.4/terraform_0.7.4_linux_amd64.zip
|
||||||
|
unzip terraform_0.7.4_linux_amd64.zip
|
||||||
|
# install packer
|
||||||
|
wget -q https://releases.hashicorp.com/packer/0.10.2/packer_0.10.2_linux_amd64.zip
|
||||||
|
unzip packer_0.10.2_linux_amd64.zip
|
||||||
|
# clean up
|
||||||
|
apt-get clean
|
||||||
|
rm terraform_0.7.4_linux_amd64.zip
|
||||||
|
rm packer_0.10.2_linux_amd64.zip
|
||||||
|
|||||||
Reference in New Issue
Block a user