Skip to content

Separate runner agent private address #381

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

Merged

Conversation

tiborhercz
Copy link
Contributor

@tiborhercz tiborhercz commented Oct 8, 2021

Description

Allow separate control of the private addresses for the runners
and the Gitlab agent.

You might want to have separate auto assign ip address settings
for the Gitlab agent and runners.

As an example when you which to have the Gitlab agent with a
public ip address so it can register itself to the Gitlab
cloud. But if you want the runners to be in a private subnet
and have the external ip of the NAT gateway instead of their
own ip.

This is needed when you have a CICD account which will
run deployments in a separate account. The CICD account will
host the custom Gitlab runner.
In the separate account you which to deploy to you want to whitelist
the CICD ip addresses so it can perform updates to the infrastructure.
These ip addresses will be always the same, because the ip's are
used from the NAT gateway which have their own eip's.

Migrations required

YES, Users who are using public ip's addresses (runners_use_private_address is set to false) for their runners they have to set variable runner_agent_uses_private_address to false too.

Verification

Tested it in my AWS account.

Allow separate control of the private addresses for the runners
and the Gitlab agent.

You might want to have separate auto assign ip address settings
for the Gitlab agent and runners.

As an example when you which to have the Gitlab agent with a
public ip address so it can register itself to the Gitlab
cloud. Were you want the runners to be in a private subnet
and have the external ip of the NAT gateway instead of their
own ip.

This is needed when you have a CICD account which will
run deployments in a separate account. The CICD account will
host the custom Gitlab runner.
In this separate account you want to whitelist the
CICD ip addresses so it can perform updates to the infrastructure.
@tiborhercz
Copy link
Contributor Author

@npalm I installed pre-commit and terraform-docs. But it seems the docs didn't got updated.

@npalm
Copy link
Collaborator

npalm commented Oct 8, 2021

We run also the agent in a private subnet, as long there is an connection to the gitlab server (or cloud) the agent can register itself. Only requires an egress

@npalm
Copy link
Collaborator

npalm commented Oct 8, 2021

@npalm I installed pre-commit and terraform-docs. But it seems the docs didn't got updated.

I have just tested it locally:

  • terraform 1.0.8
  • terraform-docs: v0.16
  • pre-commit: 2.15
  • os: mac

Just ran: pre-commit run --all-files and the README file is updated. In case you don't got it working, I can fix it later

Copy link
Collaborator

@npalm npalm left a comment

Choose a reason for hiding this comment

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

LGTM, will test later. Can you add a migration note to the PR description. For users that are using public ip address. They need to set the new variable as well.

@tiborhercz
Copy link
Contributor Author

I have added the documentation and updated the description.
Thank you for your quick reply!

@npalm npalm merged commit d45dc37 into cattle-ops:develop Oct 8, 2021
semantic-releaser bot pushed a commit that referenced this pull request Oct 8, 2021
## [4.33.0](4.32.0...4.33.0) (2021-10-08)

### Features

* Separate runner agent private address ([#381](#381)) ([d45dc37](d45dc37))
@semantic-releaser
Copy link
Contributor

🎉 This PR is included in version 4.33.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants