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: use one Resource Group for all tests #114

Merged
merged 1 commit into from
Jul 3, 2020

Conversation

pothos
Copy link
Member

@pothos pothos commented Jul 2, 2020

Each kola cluster created and destroyed its own Resource Group which
took 2-3 minutes.
Reuse the image Resource Group if it was created for the flight and
run all tests in it. To keep the amount of left over VM network objects
small, the IP addresses and NICs are deleted when an instance is
deleted - this could also be removed again if we see that deleting
these objects takes a lot of time.

How to use/testing done

./kola run -d --parallel 1 -k --platform azure --azure-blob-url 'https://flatcar.blob.core.windows.net/publish/flatcar-linux-2513.1.0-alpha.vhd?se=2099-12-31T23%3A59%3A59Z&sig=q93Hf6UggelIS3VQ%2F9sIjoz0CeREpX93o9tgTnRBrqk%3D&sp=rl&sr=b&sv=2015-02-21' --azure-location YOURLOCATION --azure-profile azureProfile.json --azure-auth service-credentials.json

@pothos pothos requested a review from a team July 2, 2020 15:07
@pothos pothos force-pushed the kai/azure-one-resource-group branch 2 times, most recently from e7867a0 to 4aa0c2c Compare July 2, 2020 16:00
platform/api/azure/instance.go Show resolved Hide resolved
platform/api/azure/instance.go Show resolved Hide resolved
platform/machine/azure/cluster.go Show resolved Hide resolved
if err != nil {
return nil, err
}
if af.ImageResourceGroup != "" && af.ImageStorageAccount != "" {
Copy link
Contributor

Choose a reason for hiding this comment

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

If I understand this change correctly, the idea is that this is initialized the first time that this function is called, and after that it keeps re-using these values, is that correct? If so, could you add this to the function doc? Maybe "If no resource groups and storage accounts have been created for this flight yet, this will also create them" ?

Copy link
Member Author

Choose a reason for hiding this comment

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

The function is called at least for every test, and it is not initializing something to reuse it. The function either uses the flight's Resource Group or creates a new one.
Added the documentation.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the extra docs, it makes more sense now! :)

Each kola cluster created and destroyed its own Resource Group which
took 2-3 minutes.
Reuse the image Resource Group if it was created for the flight and
run all tests in it. To keep the amount of left over VM network objects
small, the IP addresses and NICs are deleted when an instance is
deleted - this could also be removed again if we see that deleting
these objects takes a lot of time.
@pothos pothos force-pushed the kai/azure-one-resource-group branch from 4aa0c2c to a1d9910 Compare July 3, 2020 09:44
@pothos pothos requested a review from margamanterola July 3, 2020 09:50
Copy link
Contributor

@margamanterola margamanterola left a comment

Choose a reason for hiding this comment

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

LGTM

if err != nil {
return nil, err
}
if af.ImageResourceGroup != "" && af.ImageStorageAccount != "" {
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the extra docs, it makes more sense now! :)

@pothos pothos merged commit 61ceb4d into flatcar-master Jul 3, 2020
@pothos pothos deleted the kai/azure-one-resource-group branch July 3, 2020 10:15
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.

2 participants