Load Jenkins Instance from Image - ShoppinPal/gcp-scripts GitHub Wiki
- take a snapshot of an existing disk that works well and name it something like jenkins-aug24-2015
# create a bootable root disk with more space using the snapshot
gcloud compute disks create NAME jenkins2-us-central1-a \
--zone=us-central1-a \
--size 200GB \
--source-snapshot jenkins-aug24-2015
- create a VM instance with the bigger disk as its root disk
gcloud compute instances create jenkins-us-central1-a \
--disk name=jenkins2-us-central1-a,boot=yes \
--machine-type n1-standard-1 \
--zone=us-central1-a
- provision a static IP in google cloud and mapped it in cloudflare
- add the http-server and https-server tags to open up the firewall for jenkins-us-central1-a
- If there is a subdomain name change involved then handle that!
Needed to change the subdomain from jenkins-staging to jenkins
> https://jenkins.shoppinpal.com/configure
> https://github.com/organizations/ShoppinPal/settings/applications/202465
> sudo su
cat /etc/nginx/sites-available/default
vi /etc/nginx/sites-available/default
/etc/init.d/nginx restart
/etc/init.d/jenkins restart