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

Created mule tasks for aptly, releases page and docker hub images #1630

Merged
merged 10 commits into from
Oct 29, 2020

Conversation

btoll
Copy link

@btoll btoll commented Oct 16, 2020

Summary

I decided to make mule tasks for generating the releases page and creating/pushing the docker image(s) to docker hub.

The only thing that hasn't been mule-fied is the deb deployment. To do that, do the following steps:

  • cd to the deploy/deb directory

  • build the image:

     docker build --build-arg AWS_ACCESS_KEY_ID="$AWS_ACCESS_KEY_ID" --build-arg AWS_SECRET_ACCESS_KEY="$AWS_SECRET_ACCESS_KEY" -t aptly-algorand .
    
  • run the container:

     docker run --name aptly-algorand --rm -i -v "$XDG_RUNTIME_DIR/gnupg/S.gpg-agent":/root/.gnupg/S.gpg-agent -v "$HOME/.gnupg/pubring.kbx":/root/.gnupg/pubring.kbx -e AWS_SECRET_ACCESS_KEY="$AWS_SECRET_ACCESS_KEY" -e AWS_ACCESS_KEY_ID="$AWS_ACCESS_KEY_ID" -e CHANNEL=stable -e REPO=algorand -e VERSION=2.1.6 aptly-algorand bash create_and_push
    

Note that the releases_page directory is just temporary. It was easiest to add the files here to create the generate releases page mule task instead of futzing with tokens or another way to access a private github repository. This will be removed in the near future as we move to a better plan.

For all subsequent deployments, simply run the container and pass it the S3_SOURCE, VERSION and CHANNEL.

Test Plan

mule -f package.yaml package
CHANNEL=dev VERSION=2.1.87522 SHA=730b3fd0 mule -f package-test.yaml package-test
CHANNEL=dev VERSION=2.1.87522 mule -f package-sign.yaml package-sign
CHANNEL=dev VERSION=2.1.87522 mule -f package-upload.yaml package-upload
CHANNEL=dev VERSION=2.1.87522 NO_DEPLOY=true mule -f package-deploy.yaml package-deploy
mule -f package-deploy.yaml releases-page
docker run --name aptly-algorand --rm -i -v "$XDG_RUNTIME_DIR/gnupg/S.gpg-agent":/root/.gnupg/S.gpg-agent -v "$HOME/.gnupg/pubring.kbx":/root/.gnupg/pubring.kbx -e AWS_SECRET_ACCESS_KEY="$AWS_SECRET_ACCESS_KEY" -e AWS_ACCESS_KEY_ID="$AWS_ACCESS_KEY_ID" -e CHANNEL=dev -e REPO=algorand -e VERSION=2.1.87522 aptly-algorand bash create_and_push

@btoll btoll force-pushed the aptly_docker_image branch 6 times, most recently from b084952 to d51f8e4 Compare October 17, 2020 01:14
@btoll btoll force-pushed the aptly_docker_image branch from d51f8e4 to 95e5646 Compare October 17, 2020 01:53
@btoll btoll marked this pull request as ready for review October 27, 2020 15:39
@btoll btoll force-pushed the aptly_docker_image branch from 1f91e3c to bfd57cb Compare October 27, 2020 18:06
@btoll btoll force-pushed the aptly_docker_image branch from 3dd91c8 to 1d95bba Compare October 29, 2020 00:20
@btoll btoll force-pushed the aptly_docker_image branch from 9d2148a to 82c2c4c Compare October 29, 2020 01:11
egieseke
egieseke previously approved these changes Oct 29, 2020
Copy link
Contributor

@egieseke egieseke left a comment

Choose a reason for hiding this comment

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

A few questions.

@@ -64,9 +71,12 @@ These env vars generally don't change between stages. Here is a list of variable
- customizable environment variables:

+ `ARCH_BIT`, i.e., the value from `uname -m`
Copy link
Contributor

Choose a reason for hiding this comment

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

Was the use of ARCH_BIT removed?

Copy link
Author

Choose a reason for hiding this comment

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

I'll remove, good catch.

Copy link
Author

Choose a reason for hiding this comment

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

Oh, wait, that's on a different PR, haha.

So, yes, all those will be removed when that is merged.

- `mule -f package-deploy docker-hub`

> Note that the releases page is built from the latest release in the `algorand-dev-deb-repo` bucket, hence the need to have first run the docker container which performs that sync operation.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is this still accurate for the Jenkins pipeline?

Copy link
Author

Choose a reason for hiding this comment

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

Yes

@btoll btoll changed the base branch from master to rel/beta October 29, 2020 16:50
@btoll btoll dismissed egieseke’s stale review October 29, 2020 16:50

The base branch was changed.

egieseke
egieseke previously approved these changes Oct 29, 2020
Copy link
Contributor

@egieseke egieseke left a comment

Choose a reason for hiding this comment

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

Looks good.

@btoll btoll dismissed stale reviews from bricerisingalgorand and egieseke via e6c5ea1 October 29, 2020 18:22
@algojohnlee algojohnlee merged commit 3ae2f78 into algorand:rel/beta Oct 29, 2020
@btoll btoll deleted the aptly_docker_image branch October 29, 2020 18:30
tsachiherman pushed a commit to tsachiherman/go-algorand that referenced this pull request Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants