mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
42 lines
1.6 KiB
Plaintext
42 lines
1.6 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * tutorials/dev-app-cli.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="getting-started-cli-connecting-database_{context}"]
|
|
= Deploying the database application
|
|
|
|
The following procedure deploys `mongodb-nationalparks`, which is a MongoDB database that will hold the national park location information.
|
|
|
|
.Prerequisites
|
|
|
|
* You have deployed the `parksmap` front-end application.
|
|
* You have deployed the `nationalparks` back-end application.
|
|
|
|
.Procedure
|
|
|
|
* Deploy the `mongodb-nationalparks` database application by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc new-app registry.redhat.io/rhmap47/mongodb --name mongodb-nationalparks -e MONGODB_USER=mongodb -e MONGODB_PASSWORD=mongodb -e MONGODB_DATABASE=mongodb -e MONGODB_ADMIN_PASSWORD=mongodb -l 'app.kubernetes.io/part-of=national-parks-app,app.kubernetes.io/name=mongodb'
|
|
----
|
|
+
|
|
.Example output
|
|
+
|
|
[source,text]
|
|
----
|
|
--> Found container image 7a61087 (12 days old) from quay.io for "quay.io/mongodb/mongodb-enterprise-server"
|
|
|
|
* An image stream tag will be created as "mongodb-nationalparks:latest" that will track this image
|
|
|
|
--> Creating resources with label app.kubernetes.io/name=mongodb,app.kubernetes.io/part-of=national-parks-app ...
|
|
imagestream.image.openshift.io "mongodb-nationalparks" created
|
|
deployment.apps "mongodb-nationalparks" created
|
|
service "mongodb-nationalparks" created
|
|
--> Success
|
|
Application is not exposed. You can expose services to the outside world by executing one or more of the commands below:
|
|
'oc expose service/mongodb-nationalparks'
|
|
Run 'oc status' to view your app.
|
|
----
|