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

azure private networking #295

Merged
merged 6 commits into from
Feb 24, 2022
Merged

Conversation

jepio
Copy link
Member

@jepio jepio commented Feb 18, 2022

azure private networking

Add kola support for creating instances in an existing virtual network/subnet, and addressing them using private IP addresses. This assumes that we are either also located in the specified virtual network or can otherwise access it via VPN.

The --azure-use-private-ips option only makes sense when used together with the --azure-vnet-subnet-name, as otherwise kola creates the vnet and it won't be peered or have a VPN configured.

How to use

./bin/kola spawn --platform azure --verbose --azure-location <location> --azure-publisher kinvolk --azure-offer flatcar-container-linux-free  --azure-sku alpha --azure-use-private-ips=true --azure-vnet-subnet-name <vnet-name>/<subnet-name>

Testing done

Ran the command from the "how-to-use" section.

  • Changelog entries added in the respective changelog/ directory (user-facing change, bug fix, security fix, update)

@jepio jepio requested a review from a team February 18, 2022 08:38
When preparing a flight, network resources are created. Later when creating an
instance, we need to lookup the resources again in order to pass the Subnet
struct to the NIC creation function. Instead of performing the lookup every
time an instance is created, store it in the flight and cluster structs.
The user can now pass the name of an external vnet/subnet to use when creating
instances. If the subnet name is missing, 'default' is assumed. The validation
of the parameter is performed after creating resource group and storage account
so in case of failure we need to destroy them. The easiest way to accomplish
that is by calling the Flight or Cluster destroy methods.
… marketplace

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
Kola now supports creating instances inside an existing virtual network. When
combined with Azure VPN gateway, or when running tests from within that virtual
network, it is possible to access instances via private ip addresses. We signal
this by setting an empty public IP name, which shortcuts the lookup of the
public ip address and causes it to return the private IP.

We still need to give the instances a public IP for outbound networking.
@jepio jepio force-pushed the jepio/azure-private-networking branch from b6e0dfd to 4d8d875 Compare February 18, 2022 09:49
Copy link
Member

@krnowak krnowak left a comment

Choose a reason for hiding this comment

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

Looks good, I only had nitpicks around capitalization.

@jepio jepio force-pushed the jepio/azure-private-networking branch from bf52b45 to d14e493 Compare February 18, 2022 13:00
@jepio
Copy link
Member Author

jepio commented Feb 23, 2022

@pothos any further suggestions before merging?

@pothos
Copy link
Member

pothos commented Feb 23, 2022

@pothos any further suggestions before merging?

no, all good

@jepio jepio merged commit 465025f into flatcar-master Feb 24, 2022
@jepio jepio deleted the jepio/azure-private-networking branch February 24, 2022 10:19
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.

3 participants