First create a new OCP project.
$ oc new-project myapp
Create an application from an image.
$ oc new-app --name=todonodejs \
--image=quay.io/redhattraining/do180-todonodejs-12 \
--env MYSQL_ENV_MYSQL_DATABASE=tododb \
--env MYSQL_ENV_MYSQL_USER=user1 \
--env MYSQL_ENV_MYSQL_PASSWORD=redhat123 \
--labels app=todonodejs
Create an application based on source code in a git repository - Source-to-Image (S2I).
$ oc new-app --name=nodejs-dev \
--image-stream=nodejs:16-ubi8 \
https://github.com/magnuskkarlsson/DO180-apps#troubleshoot-review \
--context-dir=nodejs-app
Create an application from an existing template.
$ oc new-app --name=mysql --template=mysql-persistent \
--param MYSQL_USER=user1 \
--param MYSQL_PASSWORD=redhat123 \
--param MYSQL_ROOT_PASSWORD=redhat123 \
--param MYSQL_DATABASE=tododb \
--labels app=todonodejs
No comments:
Post a Comment