-
Notifications
You must be signed in to change notification settings - Fork 2
Deploying to a local CRC Cluster
These instructions will deploy Discovery using the developer
account on CRC (api.crc.testing:6443) and into the discovery
namespace. Prerequisite is that the Openshift-Local (CRC) and related oc
and podman
or docker
are installed.
First step is to build the quipucords container image.
$ cd ~/projects/quipucords
$ make build-container
# docker tag quipucords:latest quay.io/quay_user_id/quipucords:latest
$ docker push quay.io/quay_user_id/quipucords:latest
Then back in the discovery-deployer repo, simply run discodeploy --deploy:
$ cd ~/projects/discovery-deployer
$ ./discodeploy --deploy
Discovery Deployer ...
OCP_SERVER (api.crc.testing:6443):
OCP_USER (developer):
OCP_PASSWORD (*********):
DISCOVERY_NAMESPACE (discovery): discovery
APPLICATION_DOMAIN_SUFFIX (apps-crc.testing):
APPLICATION_DOMAIN (discovery-server-discovery.apps-crc.testing):
DISCOVERY_REGISTRY (quay.io):
QUIPUCORDS_IMAGE_TAG (latest):
DISCOVERY_SERVER_IMAGE (quay.io/quipucords/quipucords:latest): quay.io/abellott/quipucords:latest
DJANGO_SECRET_KEY ():
REGISTRY_USER (quipucords): abellott
About to deploy Discovery image "quay.io/abellott/quipucords:latest" to "api.crc.testing:6443"
as user "developer" to project "discovery" namespace (y/n)? y
Logging into the OpenShift cluster api.crc.testing:6443 ...
Login successful.
You have access to the following projects and can switch between them with 'oc project <projectname>':
* discovery
Using project "discovery".
Creating project discovery ...
template.template.openshift.io/discovery created
--> Deploying template "discovery/discovery" to project discovery
discovery
---------
The Discovery Server application
* With parameters:
* Discovery Project namespace=discovery
* Application Hostname=discovery-server-discovery.apps-crc.testing
* Path for the Ansible Remote Temp directory.=/var/data/tmp/ansible/remote
* Path for the Ansible Local Temp directory.=/var/data/tmp/ansible/local
* Path for the Django secret=/var/data/secret.txt
* Django secret key=ZGV2ZWxvcG1lbnQK
* Container image for the Discovery server.=quay.io/abellott/quipucords:latest
* Discovery Service Account Name=discovery-sa
* Discovery Celery Worker Minimum Replica Count=3
* Discovery Server SSL Port (API/UI)=8443
* Discovery Redis Port=6379
* Discovery PostgresQL Database Port=5432
--> Creating resources ...
serviceaccount "discovery-sa" created
secret "discovery-secrets" created
persistentvolumeclaim "discovery-data-volume-claim" created
persistentvolumeclaim "discovery-log-volume-claim" created
service "discovery-server" created
service "discovery-redis" created
service "discovery-db" created
route.route.openshift.io "discovery-server" created
deployment.apps "discovery-server" created
deployment.apps "discovery-celery-worker" created
deployment.apps "discovery-db" created
deployment.apps "discovery-redis" created
--> Success
Access your application via route 'discovery-server-discovery.apps-crc.testing'
Run 'oc status' to view your app.
Application Url: https://discovery-server-discovery.apps-crc.testing
You can see the deployment progress via crc console
or simply get the pods oc get pods
$ oc get pods
NAME READY STATUS RESTARTS AGE
discovery-celery-worker-75ff6b7996-8wml5 1/1 Running 1 6h10m
discovery-celery-worker-75ff6b7996-rpn57 1/1 Running 1 159m
discovery-celery-worker-75ff6b7996-xhnpp 1/1 Running 1 6h10m
discovery-db-7d875d8d44-df78h 1/1 Running 1 6h18m
discovery-quipucords-786448c76b-4r9kj 1/1 Running 1 177m
discovery-redis-67b55f59f6-z9qzz 1/1 Running 1 6h31m
Here are some of the screen shots for the deployment discovery product:



Accessing the discovery console (open issue):
Deploying Discovery should be via the CRC route create for discovery-server:
$ discovery_server="`oc get routes/discovery-server -o json | jq -r '.spec.host'`"
$ echo ${discovery-server}
discovery-server-discovery.apps-crc.testing
Then just open the web ui console discovery-server-discovery.apps-crc.testing:
$ open "https://${discovery_server}/"
Note
: discovery-server-discovery.apps-crc.testing is the <service_name>-<namespace>.apps-crc.testing signature.