2019-10-11 13:32:32 +02:00
|
|
|
// Module included in the following assemblies:
|
|
|
|
|
//
|
2020-10-21 13:01:57 +02:00
|
|
|
// * cli_reference/developer_cli_odo/creating_and_deploying_applications_with_odo/creating-an-application-with-a-database.adoc
|
2019-10-11 13:32:32 +02:00
|
|
|
|
|
|
|
|
[id="deploying-a-database-manually_{context}"]
|
|
|
|
|
= Deploying a database manually
|
|
|
|
|
|
|
|
|
|
. List the available services:
|
|
|
|
|
+
|
2020-08-05 13:52:43 -04:00
|
|
|
[source,terminal]
|
2019-10-11 13:32:32 +02:00
|
|
|
----
|
|
|
|
|
$ odo catalog list services
|
2020-08-05 13:52:43 -04:00
|
|
|
----
|
|
|
|
|
+
|
|
|
|
|
.Example output
|
|
|
|
|
[source,terminal]
|
|
|
|
|
----
|
2019-10-11 13:32:32 +02:00
|
|
|
NAME PLANS
|
|
|
|
|
django-psql-persistent default
|
|
|
|
|
jenkins-ephemeral default
|
|
|
|
|
jenkins-pipeline-example default
|
|
|
|
|
mariadb-persistent default
|
|
|
|
|
mongodb-persistent default
|
|
|
|
|
mysql-persistent default
|
|
|
|
|
nodejs-mongo-persistent default
|
|
|
|
|
postgresql-persistent default
|
|
|
|
|
rails-pgsql-persistent default
|
|
|
|
|
----
|
|
|
|
|
|
2019-10-11 17:39:46 +02:00
|
|
|
. Choose the `mongodb-persistent` type of service and see the required parameters:
|
2019-10-11 13:32:32 +02:00
|
|
|
+
|
2020-08-05 13:52:43 -04:00
|
|
|
[source,terminal]
|
2019-10-11 13:32:32 +02:00
|
|
|
----
|
|
|
|
|
$ odo catalog describe service mongodb-persistent
|
2020-08-05 13:52:43 -04:00
|
|
|
----
|
|
|
|
|
+
|
|
|
|
|
.Example output
|
|
|
|
|
[source,terminal]
|
|
|
|
|
----
|
2019-10-11 13:32:32 +02:00
|
|
|
*********************** | *****************************************************
|
|
|
|
|
Name | default
|
|
|
|
|
----------------- | -----------------
|
|
|
|
|
Display Name |
|
|
|
|
|
----------------- | -----------------
|
|
|
|
|
Short Description | Default plan
|
|
|
|
|
----------------- | -----------------
|
|
|
|
|
Required Params without a |
|
|
|
|
|
default value |
|
|
|
|
|
----------------- | -----------------
|
|
|
|
|
Required Params with a default | DATABASE_SERVICE_NAME
|
|
|
|
|
value | (default: 'mongodb'),
|
|
|
|
|
| MEMORY_LIMIT (default:
|
|
|
|
|
| '512Mi'), MONGODB_VERSION
|
|
|
|
|
| (default: '3.2'),
|
|
|
|
|
| MONGODB_DATABASE (default:
|
|
|
|
|
| 'sampledb'), VOLUME_CAPACITY
|
|
|
|
|
| (default: '1Gi')
|
|
|
|
|
----------------- | -----------------
|
|
|
|
|
Optional Params | MONGODB_ADMIN_PASSWORD,
|
|
|
|
|
| NAMESPACE, MONGODB_PASSWORD,
|
|
|
|
|
| MONGODB_USER
|
|
|
|
|
----
|
|
|
|
|
|
|
|
|
|
. Pass the required parameters as flags and wait for the deployment of the database:
|
|
|
|
|
+
|
2020-08-05 13:52:43 -04:00
|
|
|
[source,terminal]
|
2019-10-11 13:32:32 +02:00
|
|
|
----
|
|
|
|
|
$ odo service create mongodb-persistent --plan default --wait -p DATABASE_SERVICE_NAME=mongodb -p MEMORY_LIMIT=512Mi -p MONGODB_DATABASE=sampledb -p VOLUME_CAPACITY=1Gi
|
|
|
|
|
----
|