Make sure:
- you have access to the subscription that has publishing this extension.
- you have a subscription management certificate in
.pem
format for that. - you installed
azure-extensions-cli
(and itlist-versions
command works)
You need to update metadata/manifest.xml
with the new version number that
you should document in README.md
Changelog section and push that change upstream.
Run make bundle
to build an extension handler zip package in the bundle/
directory.
Extension follows the semantic versioning [MAJOR].[MINOR].[PATCH]. The MAJOR/MINOR
are stored in the Makefile
and PATCH is the UTC build date of the bundle in yymmddHHMM
format.
- Bump
MAJOR
if: you are introducing breaking changes in the config schema - Bump
MINOR
if: you are adding new features (no need for hotfixes or minor nits)
Run azure-extensions-cli new-extension-manifest
with the values in
metadata/manifest.xml
to upload the package and create a manifest XML. Save the output
of this program to a file (e.g. /tmp/manifest.xml
).
Publishing takes 3 steps and you will use the azure-extensions-cli
program.
“Slice 1” means you publish the extension internally only to your own publisher subscription:
export SUBSCRIPTION_ID=[...]
export SUBSCRIPTION_CERT=[...].pem
azure-extensions-cli new-extension-version --manifest [path-to-manifest]
Then check its replication status using:
azure-extensions-cli replication-status --namespace Microsoft.Azure.Extensions \
--name DockerExtension --version <VERSION>
or azure-extensions-cli list-versions
command.
Based on the load on PIR it may take from 10 minutes to 10 hours to replicate.
After the extension is listed as replicated, you can run integration tests to deploy the extension to some images and test it is actually working.
For that, make sure you have install azure
xplat CLI installed and azure login
is completed.
Then run:
./integration-test/test.sh
The tests will:
- Create test VMs with various distro images in test subscription.
- Add extension to the VMs with a config that exercises the features.
- Verify the correct version of the extension is landed to VMs.
- Verify connectivity to docker-engine with TLS certs.
- Verify other configuration is taking effect (containers are created etc.)
- Tear down the test VMs.
If the test gets stuck in a verification step and keeps printing ...
s for more than 5 minutes,
it is very likely something is going badly. You can ssh into the VM (command is printed in the test
output) and see what is going on.
(If you want to delete the buggy version, use azure-extensions-cli delete-version
at this step.)
“Slice 2” means you publish the extension publicly to one Azure PROD region:
azure-extensions-cli promote-single-region --region-1 'Brazil South' --manifest <FILE>
and then you can use azure-extensions-cli replication-status
to see it completed.
Same as “Slice 2”, but publishes to two Azure PROD regions.
azure-extensions-cli promote-two-regions --region-1 'Brazil South' --region-2 'Southeast Asia' \
--manifest <FILE>
This step publishes the VM extension to all Azure PROD regions (be careful).
azure-extensions-cli promote-all-regions --manifest <FILE>
Wait for it to be completed using azure-extensions-cli replication-status
command and
once completed, run azure vm extension list --json
command from a subscription that is not a publisher
subscription to verify if the new version is available (not applicable for hotfixes).
Once the version is successful and works in Production:
-
Document the changes in README.md “Changelog” section
-
Commit the changes to your own fork
-
End a pull request to Azure repo
-
Create a tag with the version number you published e.g.:
git tag 1.0.1506041803 git push --tags
This will create a snapshot of the code in “releases” section of the GitHub repository.