login
articles map models fish populations fish farms fishing docks fish processing plants fishing trips events

Deploying Smart Aquaculture on OpenShift Local

by Christopher Tate

Prerequisite Article

Computer requirements for Smart Aquaculture development
Computer requirements for Smart Aquaculture development
Install OpenShift Local on your own computer
Install OpenShift Local on your own computer
Deploy required microservices to OpenShift Local

Several microservices are required first before deploying the platform. These microservices include:

  • ArgoCD GitOps for deploying microservice applications
  • Hashicorp Vault for secrets management
  • Apache Zookeeper cluster manager
  • Apache Solr search engine
  • PostgreSQL relational database
  • Keycloak single sign-on for authentication and authorization
Click here for Microsoft Windows instructions for deploying the required microservices to OpenShift Local
Create a directory for your source code.

If you are already a developer, you probably have an opinion of where your source code belongs. If you are on a new computer, or new to software development, Here are some suggestions to find a place to put your source code.

Open a Command Prompt and make a new %USERPROFILE%\\src\\computate-gitops directory for your GitOps deployment code with the mkdir command.

mkdir %USERPROFILE%\src\computate-gitops\
Clone the gitops for smart-aquaculture dependent microservices

GitOps is a standard created by the ArgoCD project backed by Red Hat for deploying open source applications defined in GitHub.

Clone the computate-gitops repository into your source directory.

git clone https://github.com/computate-org/computate-gitops.git %USERPROFILE%\src\computate-gitops\

Change into your computate-gitops directory %USERPROFILE%\\src\\smart-aquaculture\\computate-gitops\\.

cd %USERPROFILE%\src\computate-gitops\

Run the command below to install the Red Hat GitOps Operator in OpenShift Local.

oc apply -k openshift-local\gitops\base\
Wait for the GitOps Operator to be ready

You need to wait patiently for the GitOps Operator to be complete. Visit the Installed Operators page here in OpenShift Local to see the GitOps Operator get installed. The openshift-gitops-operator will have a Status change from Unkown to Succeeded. If the Operator status doesn't change after several minutes, the CatalogSources might be in a bad state, then try crc delete and crc start to recreate your OpenShift Local cluster.

Run the command below to wait for the GitOps Operator control plane to start.

oc -n openshift-operators wait pod -l control-plane=gitops-operator ^
  --for=condition=Ready --timeout=5m

Then run the command below to wait for the GitOps Operator application controller to start.

oc -n openshift-gitops wait pod ^
  -l app.kubernetes.io/name=openshift-gitops-application-controller ^
  --for=condition=Ready --timeout=5m

Run the command below to install the Application Set for our dependent microservices.

oc apply -k openshift-local/gitops/app/
Wait for the Application Set to be ready

You need to wait patiently for the GitOps service to be ready. Run the command below to wait for the GitOps service to start.

oc -n openshift-gitops wait pod ^
  -l app.kubernetes.io/name=openshift-gitops-server ^
  --for=condition=Ready --timeout=5m

Then you need to wait patiently for the Application Set to sync. Access the ArgoCD application to watch the Application Set sync.

Access ArgoCD
Username and password for ArgoCD

The username for ArgoCD is kubeadmin, and the password is the kubeadmin password that it showed when OpenShift Local started. To find the kubeadmin password again, run this command:

crc start

The deployment of all the Applications in ArgoCD will probably take around 20 minutes to complete.

Deploy to OpenShift Local with ArgoCD GitOps

Once you have successfully synced all of the dependent microservice Applications, You are ready to deploy the rest of the Applications to ArgoCD.

Clone the smart-aquaculture repository into a new directory %USERPROFILE%\\src\\smart-aquaculture in your source directory.

git clone https://github.com/computate-org/smart-aquaculture.git \
  %USERPROFILE%\src\smart-aquaculture

Change into your source code directory %USERPROFILE%\\src\\smart-aquaculture.

cd %USERPROFILE%\src\smart-aquaculture\

Run the command below to install the smart-aquaculture Applications with ArgoCD.

oc apply -k openshift-local\applications\

Then you need to wait patiently for the new Applications to sync. Access the ArgoCD application to watch the Applications sync.

Access ArgoCD
Click here for Linux instructions for deploying the required microservices to OpenShift Local
Create a directory for your source code.

If you are already a developer, you probably have an opinion of where your source code belongs. If you are on a new computer, or new to software development, Here are some suggestions to find a place to put your source code.

Open a Terminal and make a new ~/.local/src/computate-gitops directory for your GitOps deployment code with the install -d command.

install -d ~/.local/src/computate-gitops/
Clone the gitops for smart-aquaculture dependent microservices

GitOps is a standard created by the ArgoCD project backed by Red Hat for deploying open source applications defined in GitHub.

Clone the computate-gitops repository into your source directory.

git clone https://github.com/computate-org/computate-gitops.git \
  ~/.local/src/computate-gitops/

Change into your computate-gitops directory ~/.local/src/smart-aquaculture/computate-gitops/.

cd ~/.local/src/computate-gitops/

Run the command below to install the Red Hat GitOps Operator in OpenShift Local.

oc apply -k openshift-local/gitops/base/
Wait for the GitOps Operator to be ready

You need to wait patiently for the GitOps Operator to be complete. Visit the Installed Operators page here in OpenShift Local to see the GitOps Operator get installed. The openshift-gitops-operator will have a Status change from Unkown to Succeeded. If the Operator status doesn't change after several minutes, the CatalogSources might be in a bad state, then try crc delete and crc start to recreate your OpenShift Local cluster.

Run the command below to wait for the GitOps Operator control plane to start.

oc -n openshift-operators wait pod -l control-plane=gitops-operator \
  --for=condition=Ready --timeout=5m

Then run the command below to wait for the GitOps Operator application controller to start.

oc -n openshift-gitops wait pod \
  -l app.kubernetes.io/name=openshift-gitops-application-controller \
  --for=condition=Ready --timeout=5m

Run the command below to install the Application Set for our dependent microservices.

oc apply -k openshift-local/gitops/app/
Wait for the Application Set to be ready

You need to wait patiently for the GitOps service to be ready. Run the command below to wait for the GitOps service to start.

oc -n openshift-gitops wait pod \
  -l app.kubernetes.io/name=openshift-gitops-server \
  --for=condition=Ready --timeout=5m

Then you need to wait patiently for the Application Set to sync. Access the ArgoCD application to watch the Application Set sync.

Access ArgoCD
Username and password for ArgoCD

The username for ArgoCD is kubeadmin, and the password is the kubeadmin password that it showed when OpenShift Local started. To find the kubeadmin password again, run this command:

crc start

The deployment of all the Applications in ArgoCD will probably take around 20 minutes to complete.

Deploy to OpenShift Local with ArgoCD GitOps

Once you have successfully synced all of the dependent microservice Applications, You are ready to deploy the rest of the Applications to ArgoCD.

Clone the smart-aquaculture repository into a new directory ~/.local/src/smart-aquaculture in your source directory.

git clone https://github.com/computate-org/smart-aquaculture.git \
  ~/.local/src/smart-aquaculture

Change into your source code directory ~/.local/src/smart-aquaculture.

cd ~/.local/src/smart-aquaculture/

Run the command below to install the smart-aquaculture Applications with ArgoCD.

oc apply -k openshift-local/applications/

Then you need to wait patiently for the new Applications to sync. Access the ArgoCD application to watch the Applications sync.

Access ArgoCD

Don't forget to share this page!

LinkedIn
Facebook
This site is open source
Generated with Computate
Powered by Google Kubernetes Engine