From f9e6f7e7aad84c334fb137e94b880a7bb6e6fc5a Mon Sep 17 00:00:00 2001 From: dariofaccin Date: Wed, 18 Jan 2023 12:03:13 +0100 Subject: [PATCH 1/2] Add how-to guide to retrieve OSM usernames and passwords Signed-off-by: Dario Faccin --- 03-installing-osm.md | 45 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/03-installing-osm.md b/03-installing-osm.md index e1c233e..21d5b7f 100644 --- a/03-installing-osm.md +++ b/03-installing-osm.md @@ -164,14 +164,55 @@ For more information on the LXD `cloud.yaml` and `credential.yaml` files consult Once the installation is over, follow these instructions to use the osmclient: ```bash -NBI_IP=juju status --format yaml | yq r - applications.nbi-k8s.address +NBI_IP=$(juju status --format yaml | yq r - applications.nbi-k8s.address) export OSM_HOSTNAME=$NBI_IP +NBI_PASSWORD=$(juju config -m osm keystone admin-password) +export OSM_PASSWORD=$NBI_PASSWORD ``` To have the osm client always available include it in your `.bashrc`: ```bash -NBI_IP=juju status --format yaml | yq r - applications.nbi-k8s.address +NBI_IP=$(juju status --format yaml | yq r - applications.nbi-k8s.address) echo "export OSM_HOSTNAME=$NBI_IP" >> ~/.bashrc +NBI_PASSWORD=$(juju config -m osm keystone admin-password) +echo "export OSM_PASSWORD=$NBI_PASSWORD" >> ~/.bashrc +``` + +#### How to retrieve login usernames and passwords in OSM Charmed installations + +The following instructions show how to retrieve usernames and passwords of OSM modules in Charmed installations. + +##### Grafana +The following commands return the username and password for logging into Grafana dashboard: +```bash +juju config -m osm mon grafana-user +juju config -m osm mon grafana-password +``` + +##### Prometheus +The following commands return the username and password for logging into Prometheus dashboard: +```bash +juju config -m osm prometheus web_config_username +juju config -m osm prometheus web_config_password +``` + +##### Databases +**Disclaimer**: manual access to the databases is usually not required and we strongly suggest not to perform operations on them. However, in case the is a particular reason to access and/or manually modify them, here you can find the steps to retrieve the login data for Keystone and MariaDB. + +###### Keystone +The following commands return the username and password for logging into Keystone: +```bash +juju config -m osm keystone admin-username +juju config -m osm keystone admin-password +juju config -m osm keystone keystone-db-password +juju config -m osm keystone service-password + ``` + +###### MariaDB +The following commands return the username and password for logging into MariaDB: +```bash +juju config -m osm mariadb root_password +juju config -m osm mariadb password ``` #### Scaling OSM Components -- GitLab From 51cefda36f8848f741462b17789c9335a4b11280 Mon Sep 17 00:00:00 2001 From: Dario Faccin Date: Mon, 23 Jan 2023 10:41:35 +0100 Subject: [PATCH 2/2] Fix NBI IP and add UI section --- 03-installing-osm.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/03-installing-osm.md b/03-installing-osm.md index 21d5b7f..cb58c22 100644 --- a/03-installing-osm.md +++ b/03-installing-osm.md @@ -164,7 +164,7 @@ For more information on the LXD `cloud.yaml` and `credential.yaml` files consult Once the installation is over, follow these instructions to use the osmclient: ```bash -NBI_IP=$(juju status --format yaml | yq r - applications.nbi-k8s.address) +NBI_IP=$(microk8s.kubectl describe -n osm ingress | grep -E "nbi.*\.io" | xargs) export OSM_HOSTNAME=$NBI_IP NBI_PASSWORD=$(juju config -m osm keystone admin-password) export OSM_PASSWORD=$NBI_PASSWORD @@ -172,7 +172,7 @@ export OSM_PASSWORD=$NBI_PASSWORD To have the osm client always available include it in your `.bashrc`: ```bash -NBI_IP=$(juju status --format yaml | yq r - applications.nbi-k8s.address) +NBI_IP=$(microk8s.kubectl describe -n osm ingress | grep -E "nbi.*\.io" | xargs) echo "export OSM_HOSTNAME=$NBI_IP" >> ~/.bashrc NBI_PASSWORD=$(juju config -m osm keystone admin-password) echo "export OSM_PASSWORD=$NBI_PASSWORD" >> ~/.bashrc @@ -182,6 +182,18 @@ echo "export OSM_PASSWORD=$NBI_PASSWORD" >> ~/.bashrc The following instructions show how to retrieve usernames and passwords of OSM modules in Charmed installations. +##### OSM UI +The following commands return the username and password for logging into OSM UI as administrator: +```bash +juju config -m osm keystone admin-username +juju config -m osm keystone admin-password +``` + +If you also need the exposed IP address for the UI, you can issue the following command: +```bash +microk8s.kubectl describe -n osm ingress | grep -E "ui.*\.io" | xargs +``` + ##### Grafana The following commands return the username and password for logging into Grafana dashboard: ```bash -- GitLab