Repository navigation
feat: run the berth server from your own berth - #69
Merged
Merged
Conversation
The Dockerfile no longer compiles berth. It takes a static build from its context, so berth can carry the same file and build its own image on a server.
…is sent With source=here the helper takes a build context on standard input and builds berth:VERSION. A release from a self-built image goes back to the baseline repository its image names, and unused self-built images are pruned down to the two newest.
…ver deploy berth run NODE upgrade-server source=here sends this berth's build context in the new input_b64 of an action, over HTTP when it is larger than the portal carries. The client follows the node's session and reads it again once the replaced server answers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
berth can now put itself into the server's image and run the server from it, without waiting for a release. Switching back to the published image works as before.
container/berth.Dockerfileis now only the runtime stage. It takes a static berth from its context. CI's image job uses the release's own x86_64 binary from thebinaryjob and setsBERTH_SOURCE=published. berth embeds the same file, and a test checks it against the file the workflow names.dev.berth.source(self-builtorpublished),dev.berth.baselineanddev.berth.binary-sha256. The build stops whenberth --versionor the SHA-256 is not what was asked.berth run NODE upgrade-server source=hereasks the node for its CPU and checks that this berth is a static Linux ELF for it. It then sends a gzipped tar (Dockerfile,requirements.txtfrom the provisioning source,/proc/self/exe) as the newAct.input_b64. That goes over HTTP when it is larger than the portal carries. The server passes it to the controller's action on stdin. The helper checks it and runsdocker build -t berth:VERSION -, which it skips when the tag already holds that binary, then swaps the container.upgrade-server version=Xon a self-built image pulls from the baseline repository. Self-built images that no container uses are pruned down to the two newest.berth server deploy [USER@]HOSTdoes the same over the user's own ssh: it builds there, sends the helper on stdin and runs it with--image. It makes a new container when there is none.--release Xgoes back to the published image.berth server imagebuilds with the local engine only.upgrade-servercan no longer be called through the controller proxy. It goes through the server's action, which needs the admin role.Reviewers: the image job now waits for the whole
binarymatrix.