Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Added the dashboard installer script with Keystone. Updated the Makefile to create a installer dist #676

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

anvithks
Copy link
Member

@anvithks anvithks commented Nov 22, 2022

What type of PR is this?
/kind enhancement

What this PR does / why we need it:
This PR adds an independent installer script for the following:

  • SODA Dashboard
  • SODA Authentication using Keystone. (Required for Strato and Terra projects)
  • SRM Toolchain with Prometheus, Grafana and Alertmanager. (Required for Delfin visualization)

The SRM toolchain will be added in a subsequent commit or PR.
Which issue(s) this PR fixes:
Fixes #675

Test Report Added?:
/kind TESTED

/kind NOT-TESTED

Test Report:

Install

soda_experience_install

Uninstall

soda_experience_uninstall

Uninstall & Purge

soda_experience_uninstall_purge

Special notes for your reviewer:

@anvithks anvithks added the enhancement New feature or request label Nov 22, 2022
@anvithks anvithks self-assigned this Nov 22, 2022
- Export the desired SODA Release version to the environment variable

```sh
export SODA_RELEASE_VERSION=v1.7.0 # Replace with SODA release version or docker tag for dashboard.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename SODA_RELEASE_VERSION to DASHBOARD_RELEASE_VERSION

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

./install.sh

Usage: install.sh <install|uninstall|uninstall_purge>
./install install : Install Auth and Dashboard.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use consistent comment for Install and uninstall,
Use # to for comment

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will update the instructions.
Since they are not comments but instructions to be shown to the user if they run the script without providing the necessary parameter these should not be # comments.

I will add some comments in the script to let the users know that these are the usage instructions.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


- This installer is currently tested and works on **Ubuntu 20.04**.

- Python >= 3.8.10 ***(This installer may not work on Ubuntu 18.04 since the python3 version may not be supported.)***
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check delfin PR #942 which works for the 18.04. (You can try to use ministone.py from that PR that contain some fixes)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joseph-v PR #942 in the installer repository?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used the ministone.py from that PR and tried on a Ubuntu 19=8.04 setup. I am getting the following exception:

Execption: HTTPConnectionPool(host='192.168.56.1', port=80): Max retries exceeded with url: /identity/v3/auth/tokens (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fd0243a5588>: Failed to establish a new connection: [Errno 111] Connection refused',))

But the same script worked in Ubuntu 20.04.

I checked online and there seem to be some dependencies that may be deprecated.
soda_experience_install_python3 6_deprecated


# Deleting the SRM Toolchain work folder
echo -e "\e[1;31m Deleting the SRM toolchain workfolder. \e[0m"
rm -Rf /opt/srm-toolchain/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/opt/srm-toolchain/ needs to be configurable. All parameters in SODA installer ansible/group_vars/srm_toolschain.yml needs to be taken as input for the script

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made the work directory configurable. User needs to export this as an environment variable or the default value is picked.

install/install.sh Show resolved Hide resolved

install_srm_toolchain() {
install $@
mkdir -p /opt/srm-toolchain
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/opt/srm-toolchain needs to be configurable

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is configurable and is picked from the variable

export ALERTMANAGER_IMAGE_TAG=v0.21.0
export SODA_ALERTMANAGER_PORT=9093
export GRAFANA_IMAGE_TAG=7.3.5
export SODA_GRAFANA_PORT=3000
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All parameters in SODA installer ansible/group_vars/srm_toolschain.yml needs to be taken as input for the script

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. These are to be exported as environment variable. The env variable is then exposed to the docker container as well.

@@ -0,0 +1,6 @@
route:
receiver: 'delfin'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why dont we keep the project specific configuration files with separate folders? Same for related files below as well.

like ....dashboard/install/conf/delfin/.......
.......conf/strato/....

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is done.
currently the structure is changed to

conf/
     - keystone/
         ...
     - delfin
         ... 

- name: Throughput
rules:

- alert: high_throughput
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of these are very specific to Delfin right?! Why these confs should be added separately under the dashboard?! Can we not source it from the respective project?!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These configurations are for configuring Prometheus and alertmanager to be viewed using SODA Dashboard. User may not use this if they are not using SODA Dashboard. Hence the configurations are to be kept in the Dashboard or SRM toolchain conf.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be the installer configuration either from SODA installer or Delfin installer where the user decides to have dashboard or not.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can consider this as an enhancement. Currently we are creating independent installer for Dashboard, which can be run from the Dashboard release.
Since most of these are environment variables the SODA Installer can just configure them at the time of installation. (This is how it currently works in the common installer as of v1.7.0)

-e OPENSDS_AUTH_URL=http://$HOST_IP/identity \
-e OPENSDS_HOTPOT_URL=http://$HOST_IP:50040 \
-e OPENSDS_GELATO_URL=http://$HOST_IP:8089 \
-e SODA_DELFIN_URL=http://$HOST_IP:8190 \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why these are hardcoded? The project selection is not available?! Or take such info from the soda conf information. Why this needs to hardcoded under dashboard? Should be part of SODA installer right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are being exposed as environment variable to the dashboard docker container. Project has never been available for the Dashboard.
There is no SODA conf information that is exported that gives these information on the env variables. These ports are internally mapped to the nginx conf within the SODA Dashboard docker container. This is the same command that was used as part of the SODA installer.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is not correct. We need to discuss and clean it. Currently can you please add FIXME and we can merge if it is a blocker.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure we can do that. But this is how it works in the SODA installer currently.
We do not have any project / module specific configuration for Dashboard.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, this is now an independent installer that needs to be run on the system without the common installer. In this case we will have to export all the required env variables on the command line and expose the same to the docker containers.

@joseph-v
Copy link
Collaborator

How do we handle the case where delfin wants prometheus (SRM Toolchain) but no dashboard. It may looks to odd to configure SRM toolschain from Dashboard in that case

@anvithks
Copy link
Member Author

How do we handle the case where delfin wants prometheus (SRM Toolchain) but no dashboard. It may looks to odd to configure SRM toolschain from Dashboard in that case

Did we have this scenario in the previous release ?

AFAIK the SRM toolchain that we use was specifically for use with SODA Dashboard .

If you need to provide it separately then we can take it up as a new requirement .

In which case we need to figure out how delfin can configure and install the srm toolchain .

@anvithks anvithks changed the title Added the dashboard installer script with Keystone. Updated the Makefile to create a installer dist [WIP] Added the dashboard installer script with Keystone. Updated the Makefile to create a installer dist Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a separate installer for SODA Dashboard and all its dependencies
3 participants