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 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 TrueBrain force-pushed the TrueBrain:aws branch 5 times, most recently from 7d9eb61 to f61b62a Dec 22, 2019
@TrueBrain
Copy link
Member Author

TrueBrain commented Dec 22, 2019

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 left a comment

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 left a comment

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

@TrueBrain TrueBrain force-pushed the TrueBrain:aws branch from f61b62a to 1060062 Dec 26, 2019
TrueBrain added 4 commits Dec 22, 2019
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.
@TrueBrain TrueBrain force-pushed the TrueBrain:aws branch from 1060062 to 66deaeb Dec 28, 2019
Copy link
Member

LordAro left a comment

LGTM

@TrueBrain TrueBrain merged commit 52ccd47 into OpenTTD:master Dec 28, 2019
1 check passed
1 check passed
website Build #20191228.6 succeeded
Details
@TrueBrain TrueBrain deleted the TrueBrain:aws branch Dec 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.