Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

Commit

Permalink
cli: generate-db-secrets
Browse files Browse the repository at this point in the history
* Changes ``--generate-default-secrets`` to ``--generate-db-secrets``
  when invoking or mentioning ``reana-cluster init``.
 (closes #209)

Signed-off-by: Tibor Šimko <tibor.simko@cern.ch>
  • Loading branch information
tiborsimko committed Jul 24, 2019
1 parent 6ccf0ee commit 5c978f0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/developerguide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ And now you can start the cluster as ``reana-cluster`` docs say:

.. code:: console
$ reana-cluster init --traefik
$ reana-cluster init --traefik --generate-db-secrets
REANA cluster is initialised
Check that all components are created:
Expand Down
2 changes: 1 addition & 1 deletion docs/gettingstarted.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Are you looking at installing and deploying REANA cluster locally on your laptop

.. code-block:: console
$ reana-cluster init --traefik --generate-default-secrets
$ reana-cluster init --traefik --generate-db-secrets
.. note::

Expand Down
5 changes: 3 additions & 2 deletions docs/userguide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ Initialising a REANA cluster is just a matter of running ``init`` command:

.. code-block:: console
$ reana-cluster init --traefik --generate-default-secrets
$ reana-cluster init --traefik --generate-db-secrets
REANA cluster is initialised.
If you have created a custom configuration, you can use the ``-f`` command-line
Expand All @@ -185,7 +185,8 @@ option and specify your own file. In the same way you can set URL for REANA clus

.. code-block:: console
$ reana-cluster -f reana-cluster-custom.yaml --url reana.cern.ch init --traefik
$ reana-cluster -f reana-cluster-custom.yaml --url reana.cern.ch init \\
--traefik --generate-db-secrets
Verify REANA components
Expand Down
12 changes: 6 additions & 6 deletions reana_cluster/cli/cluster.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
#
# This file is part of REANA.
# Copyright (C) 2017, 2018 CERN.
# Copyright (C) 2017, 2018, 2019 CERN.
#
# REANA is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
Expand Down Expand Up @@ -155,15 +155,15 @@ def restart(ctx, remove_persistent_storage):
'--traefik', is_flag=True,
help='Install and initialize Traefik')
@click.option(
'--generate-default-secrets', is_flag=True,
help='Create all needed secrets with default values. Do not use this in'
'production deployments')
'--generate-db-secrets', is_flag=True,
help='Create all necessary database secrets. Do not use this in'
'production deployments.')
@click.pass_context
def init(ctx, skip_initialization, output, traefik, generate_default_secrets):
def init(ctx, skip_initialization, output, traefik, generate_db_secrets):
"""Initialize REANA cluster."""
try:
reana_db_secret_exists = is_reana_db_secret_created()
if not reana_db_secret_exists and generate_default_secrets:
if not reana_db_secret_exists and generate_db_secrets:
create_reana_db_secret()
elif not reana_db_secret_exists:
click.echo(click.style(
Expand Down

0 comments on commit 5c978f0

Please sign in to comment.