Sunday, December 28, 2014

DEPRECATED Set up Jenkins to push new code to serving using Google App Engine (I/II)

8. Set up a "Jenkins" instance which takes newly pushed files and runs them. This follows the Set Up Push-To-Deploy documentation of Google Cloud Platform.

8.1. Install the Google Could SDK inside the Cloud9 workspace and log in:

curl https://sdk.cloud.google.com | bash
bash
gcloud auth login

8.2. Enable the Google Compute Engine API:



8.3. Run a VM:
export PASSWORD=<12-char password with letters and numbers>
export PROJECT_ID=<app engine application id, for me: find-home-in-go>

gcloud compute \
    instances create bitnami-jenkins \
    --project ${PROJECT_ID} \
    --image-project bitnami-launchpad \
    --image bitnami-jenkins-1-587-0-linux-debian-7-x86-64-image \
    --zone us-central1-a \
    --machine-type n1-standard-1 \
    --metadata "bitnami-base-password=${PASSWORD}" \
               "bitnami-default-user=user" \
               "bitnami-key=jenkins" \
               "bitnami-name=Jenkins" \
               "bitnami-version=1-587-0" \
               "bitnami-url=//bitnami.com/stack/jenkins" \
               "bitnami-description=Jenkins." \
               "startup-script-url=https://dl.google.com/dl/jenkins/p2dsetup/setup-script.sh" \
    --scopes "https://www.googleapis.com/auth/userinfo.email" \
             "https://www.googleapis.com/auth/devstorage.full_control" \
             "https://www.googleapis.com/auth/projecthosting" \
             "https://www.googleapis.com/auth/appengine.admin" \
    --tags "bitnami-launchpad"

8.4. Enable HTTP(S) traffic on the running VM by checking two boxes in the Developer Console:

3 comments: