There are a few preq to be done before running make:
- Clone openshift/release and openshift/shared-secrets
- Create a new service account
- Create a new subdomain that GCE will manage
- Modify gcp-dev/vars.yml
git clone https://github.com/openshift/release
git clone https://github.com/openshift/shared-secrets
- Navigate to IAM & admin
- Create Service Account
- Provide service account name
- Check furnish a new private key
- Role: Project - Editor
Download and save service-account json file. This will be used later.
To create a CloudDNS:
- Navigate to CloudDNS: Network services -> CloudDNS
- Click "Create Zone"
- Provide appropriate values
The next screen will provide the name servers that should be used in your existing DNS configuration for the subdomain.
Results using the gcloud
cli
jcallen@cnvlab-209908:~$ gcloud dns managed-zones list
NAME DNS_NAME DESCRIPTION
virtomation-com gce.virtomation.com.
Create a subdomain for GCE in your DNS. For this example I used a domain that I own.
$ host -t NS gce.virtomation.com
gce.virtomation.com name server ns-cloud-b4.googledomains.com.
gce.virtomation.com name server ns-cloud-b1.googledomains.com.
gce.virtomation.com name server ns-cloud-b2.googledomains.com.
gce.virtomation.com name server ns-cloud-b3.googledomains.com.
Change directory to release.
cd ./release/cluster/test-deploy/gcp-dev
Modify vars.yaml
and the following variables should be changed based on your configuration.
openshift_gcp_project: cnvlab-209908
# The subdomain that we just created
public_hosted_zone: gce.virtomation.com
# The name GCE name of the CloudDNS
dns_managed_zone: virtomation-com
Create ./release/cluster/test-deploy/gcp-dev/kubevirt.yaml
# This option is only available in openshift-ansible master (08-16-2018)
openshift_gcp_licenses: https://www.googleapis.com/compute/v1/projects/vm-options/global/licenses/enable-vmx
# openshift_release is required for 3.10 until the origin-ansible:3.10 container image is updated with changes
# to support gcp licenses.
#openshift_release: "3.10"
# We are not upgrading and these packages are always missing.
openshift_enable_excluders: False
# Copy service account json to gce.json
cp ~/Downloads/<sa>.json ./release/cluster/test-deploy/gcp-dev/gce.json
See Configure a profile
for the additional files required - excluding the gce.json
.
See test-deploy README for additional information
Current make options:
WHAT
: Base name of the clusterPROFILE
: Which deployment profile that will be run. Currently only usegcp-dev
.REF
: branch or tag of the cluster that should be deployed.
NOTE: Set openshift_release
to 3.10
(or just uncomment within kubevirt.yaml
)
sudo OPENSHIFT_ANSIBLE_IMAGE=quay.io/openshift/origin-ansible:latest make WHAT=jcallen PROFILE=gcp-dev REF=release-3.10 up
sudo OPENSHIFT_ANSIBLE_IMAGE=quay.io/openshift/origin-ansible:latest make WHAT=jcallen PROFILE=gcp-dev REF=master up
Instead of installing the openshift client let's use a existing container with the client already installed. NOTE: docker can be replaced with podman if not available on your operating system.
Example:
sudo podman run -it --rm \
-v ${PWD}/gcp-dev/:/gcp-dev:Z \
-e KUBECONFIG=/gcp-dev/admin.kubeconfig quay.io/openshift/origin-cli:v3.10.0 oc get nodes
See build.sh