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

Individual production docker script generator #974

Open
wants to merge 5 commits into
base: release_June_2024
Choose a base branch
from

Conversation

nedvedba
Copy link
Collaborator

@nedvedba nedvedba commented Aug 1, 2024

This pull request serves to integrate the changes that add bash scripts that will generate the necessary scripts for running DataFed in production using individual scripts for starting, stopping, and removing the docker containers.

@nedvedba nedvedba added the Component: Scripts Helper scripts or admin scripts label Aug 1, 2024
Copy link
Collaborator

@JoshuaSBrown JoshuaSBrown left a comment

Choose a reason for hiding this comment

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

Thanks @nedvedba for doing this, this greatly simplifies the process. Just a few comments and one big change needed. These runtime scripts need to replace what is in the CI pipelines so they are being tested as part of the CI process you will need to change the contents in .gitlab/end-to-end.yml.

I would also recommend putting comments in the auto generated files indicating that they were auto generated by the ./scripts/generate_ blahblahblah

exit 1
fi

cat << EOF > "$DATAFED_INSTALL_PATH/scripts/create_datafed_network.sh"
Copy link
Collaborator

Choose a reason for hiding this comment

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

This will fail if the scripts folder is not first created you probably need to run

mkdir -p "${DATAFED_INSTALL_PATH}/scripts"

-e DATAFED_DEFAULT_LOG_PATH="/datafed/logs" \\
-e DATAFED_CORE_ADDRESS_PORT_INTERNAL="\$DATAFED_CORE_ADDRESS_PORT_INTERNAL" \\
-e UID="\$USER_ID" \\
--network datafed-network \\
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm pretty sure we are going to need to remove --network and assume that each container may very well be running on a different machine.

cat << EOF > "$DATAFED_INSTALL_PATH/scripts/stop_web_container.sh"
#!/bin/bash

docker container stop datafed-web_$local_DOCKER_TAG
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why doesn't this have a rm line like the others?

@JoshuaSBrown JoshuaSBrown added the Priority: High Highest priority label Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Scripts Helper scripts or admin scripts Priority: High Highest priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants