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

[Fixes #373] Fixed envsubst not working on Ubuntu18.04/CentOS8 on VirtualBox #374

Merged
merged 1 commit into from
Aug 24, 2020

Conversation

anvithks
Copy link
Member

What type of PR is this?
/kind bug fix

What this PR does / why we need it:
This PR fixes the issue of dashboard not accessible on fresh installation on Ubuntu18.04 and CentOS8 on VirtualBox.
During the process of bringing up the docker container for dashboard the entrypoint.sh file is executed. As part of the initialisation the nginx configuration and environment variable substitution is performed.
This environment variable substitution is performed using the following line: link here
envsubst '\${OPENSDS_S3_HOST} \${OPENSDS_S3_PORT}' < "/var/www/html/assets/data/runtime.json" > "/var/www/html/assets/data/runtime.json"

This code works on Ubuntu 16.04 and Ubuntu 18.04 when installing on a VM or a Laptop. But while installing on VirtualBox using Ubuntu18.04 or CentOS8 the above line does not execute.
The envsubst command is shipped with the nginx:alpine image on which the docker container for the dashboard is based and is the recommended way to replace environment variables at runtime.

To solve this issue the line is replaced with the following line:
echo "{\"hostIP\": \"$OPENSDS_S3_HOST\",\"hostPort\": \"$OPENSDS_S3_PORT\"}" >/var/www/html/assets/data/runtime.json

Which issue(s) this PR fixes:

Fixes #373

Test Report Added?:
/kind TESTED

Test Report:

Special notes for your reviewer:
Tested on VirtualBox installation of Ubuntu18.04. Able to access the dashboard.

@anvithks anvithks added the bug-fix Pull requests that are fixes for bugs found during testing. label Jul 18, 2020
@anvithks anvithks self-assigned this Jul 18, 2020
Copy link
Collaborator

@kumarashit kumarashit left a comment

Choose a reason for hiding this comment

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

LGTM

@kumarashit kumarashit requested a review from joseph-v July 30, 2020 07:05
Copy link
Collaborator

@skdwriting skdwriting left a comment

Choose a reason for hiding this comment

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

LGTM

@skdwriting skdwriting merged commit e5c1e38 into sodafoundation:master Aug 24, 2020
@anvithks anvithks added this to the G-Release milestone Sep 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-fix Pull requests that are fixes for bugs found during testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to access the dashboard when installing on Ubuntu 18.04 and CentOS on VirtualBox
3 participants