The model is working properly in staging and can now be deployed to production. The production environment will be under the {{USER_ID}}-prod
namespace.
Using container images allows us to have consistency across environments. Containers allows us to package our model and its dependencies into an image and will run the same regardless of their deployment environment.
We will be using {{ECLIPSE_CHE_URL}}[ CodeReady Workspaces^], and log in using the username and
password you’ve been assigned (e.g. {{ USER_ID }}/{{ CHE_USER_PASSWORD }}
):
To promote the image from staging to production environment, we are going to merge our stage
to prod
deployment branch. If there is a need for an approval process, Red Hat Process Automation Manager can be used to approve the Pull Request before the changes are merged.
cd /projects/{{USER_DEPLOY_REPO_NAME}}
git checkout -b prod
git merge stage
git push -u -v origin prod
You can now login to {{ARGOCD_URL}}/applications/{{USER_ID}}-prod[Argo CD^] with your {{USER_ID}}/{{OPENSHIFT_USER_PASSWORD}}
credential to view the changes that Argo CD is making to the production environment.
Once the model has been deployed and is running, you can now run some simple tests. The test will send sample data to the prediction endpoint.
/projects/{{USER_MODEL_REPO_NAME}}/bin/prod-mon-test.sh