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

Add documentation about running METviewer through Docker. #258

Open
21 tasks
JohnHalleyGotway opened this issue Feb 10, 2021 · 0 comments
Open
21 tasks

Add documentation about running METviewer through Docker. #258

JohnHalleyGotway opened this issue Feb 10, 2021 · 0 comments
Assignees
Labels
component: documentation Documentation issue priority: medium Medium Priority requestor: NOAA/SWPC NOAA Space Weather Prediction Center type: task An actionable item of work

Comments

@JohnHalleyGotway
Copy link
Contributor

Describe the Task

Add documentation about running METviewer through Docker. When applying the METviewer Docker image to the NOAA/SWPC project, Jonathan learned a lot about running METviewer through Docker. Recommend that we add a chapter or section to the METviewer User's Guide about doing so.

In particular, we ran into permissions issues that looked like this:

musial6:SWPC johnhg$ docker-compose up -d
Creating mysql_mv ... done
Creating metviewer_1 ... error

ERROR: for metviewer_1  Cannot start service metviewer: Cannot link to a non running container: /mysql_mv AS /metviewer_1/mysql_mv

ERROR: for metviewer  Cannot start service metviewer: Cannot link to a non running container: /mysql_mv AS /metviewer_1/mysql_mv
ERROR: Encountered errors while bringing up the project.

Running docker logs reveals:

musial6:SWPC johnhg$ docker logs 41674fa11eb1
2021-02-10 22:36:24+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.33-1debian10 started.
2021-02-10 22:36:24+00:00 [Note] [Entrypoint]: Initializing database files
mysqld: Can't create/write to file '/var/lib/mysql/is_writable' (Errcode: 1 - Operation not permitted)
2021-02-10T22:36:24.707591Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2021-02-10T22:36:24.713566Z 0 [ERROR] --initialize specified but the data directory exists and is not writable. Aborting.
2021-02-10T22:36:24.713608Z 0 [ERROR] Aborting

The reason for this error is as follows:

  • $MYSQL_DIR points to a directory (mysql) on my local machine.
  • But the permissions on my local mysql directory are set too restrictive.
  • The docker-compose.yml file launches MySQL as the mysql user in the mysql group and mounts my local $MYSQL_DIR to /var/lib/mysql inside the container.
  • But the test to see if the mysql user can write to /var/lib/mysql/is_writable fails because the permissions on my local machine are too restrictive.

So in this case, we should advise users to open up the permissions on their local machine... or solve this permissions issue in some other way.

Recommend that this be one of the several lessons learned in the METviewer chapter about Docker.

Time Estimate

Estimate the amount of work required here.
Issues should represent approximately 1 to 3 days of work.

Sub-Issues

Consider breaking the task down into sub-issues.

  • Add a checkbox for each sub-issue here.

Relevant Deadlines

List relevant project deadlines here or state NONE.

Funding Source

Define the source of funding and account keys here or state NONE.

Define the Metadata

Assignee

  • Select engineer(s) or no engineer required
  • Select scientist(s) or no scientist required

Labels

  • Select component(s)
  • Select priority
  • Select requestor(s)

Projects and Milestone

  • Review projects and select relevant Repository and Organization ones or add "alert:NEED PROJECT ASSIGNMENT" label
  • Select milestone to next major version milestone or "Future Versions"

Define Related Issue(s)

Consider the impact to the other METplus components.

Task Checklist

See the METplus Workflow for details.

  • Complete the issue definition above, including the Time Estimate and Funding Source.
  • Fork this repository or create a branch of develop.
    Branch name: feature_<Issue Number>_<Description>
  • Complete the development and test your changes.
  • Add/update log messages for easier debugging.
  • Add/update unit tests.
  • Add/update documentation.
  • Push local changes to GitHub.
  • Submit a pull request to merge into develop.
    Pull request: feature <Issue Number> <Description>
  • Define the pull request metadata, as permissions allow.
    Select: Reviewer(s), Project(s), Milestone, and Linked issues
  • Iterate until the reviewer(s) accept and merge your changes.
  • Delete your fork or branch.
  • Close this issue.
@JohnHalleyGotway JohnHalleyGotway added type: task An actionable item of work priority: medium Medium Priority component: documentation Documentation issue requestor: NOAA/SWPC NOAA Space Weather Prediction Center labels Feb 10, 2021
@JohnHalleyGotway JohnHalleyGotway added this to the METviewer 4.0 milestone Feb 10, 2021
@TatianaBurek TatianaBurek removed this from the METviewer 4.1 milestone Mar 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: documentation Documentation issue priority: medium Medium Priority requestor: NOAA/SWPC NOAA Space Weather Prediction Center type: task An actionable item of work
Projects
None yet
Development

No branches or pull requests

3 participants