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

[kots]: enable use of a local registry #9155

Merged
merged 4 commits into from
Apr 21, 2022
Merged

[kots]: enable use of a local registry #9155

merged 4 commits into from
Apr 21, 2022

Conversation

mrsimonemms
Copy link
Contributor

@mrsimonemms mrsimonemms commented Apr 6, 2022

Description

This will enable use of Replicated's airgapped functionality.

Related Issue(s)

Fixes #9180
Fixed #9041

How to test

  1. Use the self-hosted infra repo to create an Azure airgapped installation. Set the TF_VAR_domain_name envvar to the domain name you want to use and TF_VAR_enabled_airgapped=true.
  2. Download the latest airgapped bundle on the dev-sje channel
  3. Run make install to get the command to install Gitpod via KOTS. This will also configure the local registry
  4. In localhost:8800, configure and install the application. IMPORTANT this will hide the Gitpod registry config - this is because we must use the same registry that images are pulled from.

Important, this has been tested with a valid TLS cert issued via LetsEncrypt. Self-signed/corporate CA certs are outside the scope of this ticket

This workflow doesn't include anything past login as that requires a self-hosted GitLab instance on the same network which I've not yet done. In theory, this should work fine but any further stuff for that can be done as a future PR.

Release Notes

[kots]: enable use of a local registry

Documentation

@@ -24,7 +24,7 @@ spec:
containers:
- name: installer
# This will normally be the release tag - using this tag as need the license evaluator
image: 'eu.gcr.io/gitpod-core-dev/build/installer:sje-installer-mini-config.0'
image: 'eu.gcr.io/gitpod-core-dev/build/installer:sje-airgapped.0'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is why I want to have a latest tag for the Installer

Copy link
Contributor

Choose a reason for hiding this comment

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

latest is never latest - just forget to change the PullPolicy and you'll spend hours wondering why this doesn't work as expected.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I know. This line is actually changed by the werft job when it pushes to KOTS. It's just for avoidance for having to change line in PRs

@roboquat roboquat added size/M and removed size/S labels Apr 6, 2022
@mrsimonemms mrsimonemms force-pushed the sje/airgapped branch 2 times, most recently from bca24d7 to 95711ac Compare April 8, 2022 13:04
@roboquat roboquat added size/L and removed size/M labels Apr 8, 2022
@mrsimonemms mrsimonemms force-pushed the sje/airgapped branch 2 times, most recently from 90f33bd to a9918dc Compare April 8, 2022 14:55
@mrsimonemms
Copy link
Contributor Author

mrsimonemms commented Apr 8, 2022

/werft run publish-to-kots

👍 started the job as gitpod-build-sje-airgapped.7

@mrsimonemms
Copy link
Contributor Author

/werft run publish-to-kots with-clean-slate-deployment

@mrsimonemms
Copy link
Contributor Author

mrsimonemms commented Apr 8, 2022

/werft run publish-to-kots with-clean-slate-deployment

👍 started the job as gitpod-build-sje-airgapped.10

@mrsimonemms
Copy link
Contributor Author

mrsimonemms commented Apr 8, 2022

/werft run publish-to-kots

👍 started the job as gitpod-build-sje-airgapped.11

@mrsimonemms
Copy link
Contributor Author

mrsimonemms commented Apr 8, 2022

/werft run publish-to-kots

👍 started the job as gitpod-build-sje-airgapped.13

@mrsimonemms
Copy link
Contributor Author

mrsimonemms commented Apr 8, 2022

/werft run publish-to-kots

👍 started the job as gitpod-build-sje-airgapped.15

@mrsimonemms
Copy link
Contributor Author

mrsimonemms commented Apr 13, 2022

/werft run publish-to-kots

👍 started the job as gitpod-build-sje-airgapped.17

@mrsimonemms
Copy link
Contributor Author

mrsimonemms commented Apr 13, 2022

/werft run publish-to-kots with-clean-slate-deployment

👍 started the job as gitpod-build-sje-airgapped.18

@mrsimonemms
Copy link
Contributor Author

mrsimonemms commented Apr 13, 2022

/werft run with-clean-slate-deployment

👍 started the job as gitpod-build-sje-airgapped.20

@mrsimonemms
Copy link
Contributor Author

mrsimonemms commented Apr 13, 2022

/werft run publish-to-kots

👍 started the job as gitpod-build-sje-airgapped.21

@mrsimonemms
Copy link
Contributor Author

mrsimonemms commented Apr 19, 2022

/werft run publish-to-kots with-clean-slate-deployment no-preview

👍 started the job as gitpod-build-sje-airgapped.33

@mrsimonemms
Copy link
Contributor Author

mrsimonemms commented Apr 19, 2022

/werft run publish-to-kots no-preview

👍 started the job as gitpod-build-sje-airgapped.35

@mrsimonemms
Copy link
Contributor Author

mrsimonemms commented Apr 19, 2022

/werft run publish-to-kots with-clean-slate-deployment no-preview

👍 started the job as gitpod-build-sje-airgapped.37

@mrsimonemms
Copy link
Contributor Author

mrsimonemms commented Apr 19, 2022

/werft run publish-to-kots with-clean-slate-deployment no-preview

👍 started the job as gitpod-build-sje-airgapped.39

This moves the ImageName and RepoName functions to the RenderContext
struct.
@mrsimonemms
Copy link
Contributor Author

mrsimonemms commented Apr 19, 2022

/werft run publish-to-kots no-preview

👍 started the job as gitpod-build-sje-airgapped.41

@mrsimonemms mrsimonemms marked this pull request as ready for review April 20, 2022 08:13
@mrsimonemms mrsimonemms requested a review from csweichel April 20, 2022 08:13
Copy link
Member

@geropl geropl left a comment

Choose a reason for hiding this comment

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

Reviewed again, looks even better now. Adding my rubber-stamp here, again. 🤞

@geropl geropl self-assigned this Apr 20, 2022
Copy link
Contributor

@csweichel csweichel left a comment

Choose a reason for hiding this comment

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

Thanks Simon :)

@mrsimonemms
Copy link
Contributor Author

mrsimonemms commented Apr 20, 2022

/werft run no-preview

👍 started the job as gitpod-build-sje-airgapped.42

@corneliusludmann
Copy link
Contributor

@mrsimonemms Started with the review but need more time testing it. Will finish my review tomorrow. 🙏

Copy link
Contributor

@mustard-mh mustard-mh left a comment

Choose a reason for hiding this comment

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

I am not sure how to test, but code LGTM

@roboquat roboquat merged commit 948ae51 into main Apr 21, 2022
@roboquat roboquat deleted the sje/airgapped branch April 21, 2022 12:56
@roboquat roboquat added deployed: workspace Workspace team change is running in production deployed: IDE IDE change is running in production deployed: webapp Meta team change is running in production labels Apr 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: IDE IDE change is running in production deployed: webapp Meta team change is running in production deployed: workspace Workspace team change is running in production release-note size/XXL team: delivery Issue belongs to the self-hosted team team: IDE team: webapp Issue belongs to the WebApp team team: workspace Issue belongs to the Workspace team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change the container images to use the KOTS registry format Allow for air-gapped installation
7 participants