Commit b7ddc927 authored by Sofia Papagiannaki's avatar Sofia Papagiannaki

snf_deploy: Setup oa2 app

parent e50baa8d
......@@ -12,3 +12,5 @@ PITHOS_USER_LOGIN_URL = 'https://%ACCOUNTS%/login/'
PITHOS_BASE_URL = 'https://%PITHOS%/pithos'
ASTAKOS_AUTH_URL = 'https://%ACCOUNTS%/astakos/identity/v2.0'
PITHOS_OAUTH2_CLIENT_CREDENTIALS = ('pithos-view', '12345')
......@@ -91,7 +91,7 @@ Usage: snf-deploy run <action> [<action>...]
setup_hosts setup_nfs_server \
get_auth_token_from_db
setup_image_helper update_ns_for_ganeti get_service_details
setup_image_host gnt_instance_add
setup_image_host astakos_register_pithos_view gnt_instance_add
setup_iptables gnt_network_add
setup_kamaki Test commands: register_image
setup_lvm test restart_services
......@@ -443,6 +443,7 @@ def get_actions(*args):
# add_user fails if no groups found
"astakos_loaddata", "add_user", "activate_user",
"astakos_register_components",
"astakos_register_pithos_view",
"setup_cms", "cms_loaddata",
"setup_pithos",
"setup_vncauthproxy",
......
......@@ -609,6 +609,19 @@ def astakos_register_components():
try_run(cmd)
@roles("accounts")
def astakos_register_pithos_view():
debug(env.host, " * Register pithos view as oauth2 client...")
pithos_base_url = "https://%s/pithos" % env.env.pithos.fqdn
cmd = """
snf-manage oauth2-client-add pithos-view --secret=12345 --is-trusted \
--url {0}
""".format('%s/ui/view' % pithos_base_url)
try_run(cmd)
@roles("accounts")
def add_user():
debug(env.host, " * adding user %s to astakos..." % env.env.user_email)
......@@ -679,6 +692,7 @@ EOF
snf-manage syncdb --noinput
snf-manage migrate im --delete-ghost-migrations
snf-manage migrate quotaholder_app
snf-manage migrate oa2
"""
try_run(cmd)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment