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

Various of fixes in preparation of running this Docker on AWS #116

Merged
merged 4 commits into from Dec 28, 2019

Conversation

TrueBrain
Copy link
Member

@TrueBrain TrueBrain commented Dec 22, 2019

This is still a WIP. Missing:

  • Actions to test the repository
  • Actions to publish the repository (for master and tags)
  • Way to rebuild and publish an image
  • Deployment to AWS when a new image is created

(yes, this deprecates the use of Azure Pipelines)

I am going to change how tags are created on the images. The master branch will have the tag dev (and development), and it will overwrite this tag. The tags will have the tag (wit for example 1.1.18): 1, 1.1, 1.1.18, and here too it will overwrite these tags when rebuild/published. This means tags will no longer contain the date of when they were published. This will now be inside the docker image as a LABEL. See here to understand why the current system is not working :)

This means that production needs to fetch the latest tag, which can be a bit unclear. So, instead, we are going to deploy based on the sha256 tag. The downside is that in the cluster it will be difficult to see which version is running exactly. The deployment page on GitHub hopefully will help with that.

Rebuilding can be done via repository_dispatch. This is a simple API call, and can do both master as tags.

fetch-downloads.py Outdated Show resolved Hide resolved
fetch-downloads.py Outdated Show resolved Hide resolved
@TrueBrain
Copy link
Member Author

Could use a review on this, although I understand that might be difficult. Any questions about what it is doing and why, please let me know. I could use a fresh pair of eyes on this really :)

Please do not merge; I have some other things to put into place before this is merged :)

Copy link
Member

@LordAro LordAro left a comment

Choose a reason for hiding this comment

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

By "tags", you mean docker hub tags, right? I was wondering for a long time why you would want your CI to retag your git repo...

Dockerfile Show resolved Hide resolved
fetch-downloads.py Outdated Show resolved Hide resolved
.github/workflows/testing.yml Show resolved Hide resolved
.github/workflows/publish.yml Outdated Show resolved Hide resolved
Copy link
Member Author

@TrueBrain TrueBrain left a comment

Choose a reason for hiding this comment

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

Yeah, Docker tags :) I can rename all the vars to DOCKER_TAG, but that is annoying to read .. suggestions? :)

In the way this Docker is used in production, there is always a
webserver in front of it, logging everything. By minimizing what this
Docker is logging, we can easier see what is going wrong.
It currently was generating the HTML of the last 10 months (and
increasing). This was giving more and more issues due to the
instability of the current CDN in use.

As there is no need to generate HTML for all the nightlies anyway,
limit it to the last 14 is a good idea anyway. For those that want
to access older nightlies, they can use the archive directly.
This is meant as replacement for Azure Pipelines, and uses more
of the native functionality within Github.
Copy link
Member

@LordAro LordAro left a comment

Choose a reason for hiding this comment

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

LGTM

@TrueBrain TrueBrain merged commit 52ccd47 into OpenTTD:master Dec 28, 2019
@TrueBrain TrueBrain deleted the aws branch December 28, 2019 18:11
@TrueBrain TrueBrain restored the aws branch December 1, 2020 10:25
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.

None yet

3 participants