Skip to content

Latest commit

 

History

History
68 lines (55 loc) · 3.9 KB

README.md

File metadata and controls

68 lines (55 loc) · 3.9 KB

This repo helps to automate the deployment of Cloudbreak Deployer. We use Google deployment manager to create a vm with the necessary resources that starts a Cloudbreak deployment by the startup script. The only dependency that needs to be installed on your machine is the Google cloud SDK. The SDK contains the gcloud CLI tool which is the main pillar of our deployer examples. The virtual machines always started from the latest Centos 7 image that is available under the centos-cloud image repository.

Prerequisites

  • Google cloud SDK
  • The Compute Engine API and the Cloud Runtime Configuration API services need to be enabled under the navigation menu APIs & Services subitem. Click on "ENABLE APIS AND SERVICES" then type the service names in the filter and enable it.
  • A service account is needed that has read and write permissions to Compute Image, Compute Instance, Compute Network, Compute Security and Cloud RuntimeConfig. This service account email needs to specified in the config.yaml or in the gcloud command explicitly as a property.

Deploy 2.9.2 via gcloud command line interface by using template config

Please review and customize the following fields of vm_template_config.yaml file first

    region: us-central1
    zone: us-central1-a
    instance_type: n1-standard-4
    ssh_pub_key: "You need to set the SSH_KEY environment variable"
    os_user: cloudbreak
    user_email: admin@example.com
    user_password: cloudbreak
    service_account_email: You need to set the GCP_ACCOUNT_EMAIL environment variable

Run the following command to create a new deployment

gcloud deployment-manager deployments create cbd-deployment --config=vm_template_config.yaml

Delete the previously created deployment via gcloud command line interface

gcloud deployment-manager deployments delete cbd-deployment -q

Deploy 2.9.2 via gcloud command line interface by using template config

With the gcloud command-line tool, you can pass in the template file directly and provide the values for your template properties explicitly on the command-line. But in this case you should specify all of the properties that is required by our template schema. We have generated a default one, but please review and customize the previously mentioned key-value pairs, especially the ssh_pub_key one:

gcloud deployment-manager deployments create cbd-deployment \
    --template=vm-template.jinja \
    --properties region:us-central1,zone:us-central1-a,instance_type:n1-standard-4,os_user:cloudbreak,user_email:admin@example.com,user_password:'cloudbreak',cbd_version:2.9.2,startup-script:'https://raw.githubusercontent.com/hortonworks/cbd-quickstart/2.9.2/install-and-start-cbd.sh',source_image:centos-7-v20190619,ssh_pub_key:'...',service_account_email:'...'

Image versions of the templates

List the latest available CentOS images

We are using the CentOS images from the centos-cloud global image repository.

 make list-latest-images

List the version of the configured CentOS image

make echo_version

Update the image version in the generated templates

The version of the image in the generated template is configured as an environment variable in the Makefile. To update only the variable needs to be overridden with the name of the desired centos-cloud image in the Makefile.

export CENTOS_CLOUD_IMAGE_NAME=centos-7-v20190619

After updating the image version the templates needs to be regenerated by running the make build command to get the ARM template with the updated image version.

Current source image

https://www.googleapis.com/compute/v1/projects/centos-cloud/global/images/centos-7-v20190619