microsoftdocs / mslearn-aks-deployment-pipeline-github-actions Goto Github PK
View Code? Open in Web Editor NEWSample code for the MS Learn module for AKS with GitHub Actions
License: Creative Commons Attribution 4.0 International
Sample code for the MS Learn module for AKS with GitHub Actions
License: Creative Commons Attribution 4.0 International
Hi
In step unit 10 Create the deployment pipeline
When running the workflow build-latest.yaml
I'm getting the following error on Run Helm Deploy step:
Error: unable to build kubernetes objects from release manifest: unable to recognize "": no matches for kind "Ingress" in version "v1"
Error: Process completed with exit code 1.
This is how my workflow looks like:
__name: Build and push the latest build to staging
on:
push:
branches: [ main ]
jobs:
build_push_image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build and push staging image
uses: docker/[email protected]
with:
username: ${{ secrets.ACR_LOGIN }}
password: ${{ secrets.ACR_PASSWORD }}
registry: ${{ secrets.ACR_NAME }}
repository: contoso-website
tags: latest
_deploy:
runs-on: ubuntu-latest
needs: build_push_image
steps:
- uses: actions/checkout@v2
- name: Install Helm
uses: Azure/setup-helm@v1
with:
version: v3.3.1
- name: Get AKS Credentials
uses: Azure/aks-set-context@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
resource-group: mslearn-gh-pipelines-8235
cluster-name: contoso-video
- name: Run Helm Deploy
run: |
helm upgrade \
--install \
--create-namespace \
--atomic \
--wait \
--namespace staging \
contoso-website \
./kubernetes/contoso-website \
--set image.repository=${{ secrets.ACR_NAME }} \
--set dns.name=${{ secrets.DNS_NAME }}__
Please advise_
Lines 39 and 40 the sed
commands.
When I ran the script I got the errors ( <acr-name>
and <dns-name>
where the actual values).
sed: can't read s+!IMAGE!+<acr-name>/contoso-website+g: No such file or directory
sed: can't read s+!DNS!+<dns-name>+g: No such file or directory
I'm assuming the intent of the commands is to replace the azure values but as we proceed through the tutorial that is done via helm anyway. So I think that these commands should be removed.
Copy/Paste error on the echo on line 47
Currently
echo "-> AKS Cluster Name: $ACR_NAME"
Should be
echo "-> AKS Cluster Name: $AKS_NAME"
so the output would be
-> AKS Cluster Name: contoso-video
Repository specified in the dockerfile 'https://github.com/khaosdoctor/mslearn-aks-deployment-pipeline-github-actions/' not found
I'm getting buildx failed with: error: invalid tag "***/contoso-website:${GITHUB_REF#refs/tags}": invalid reference format
for the production builds.
Did anyone have a problem when deploying where the Action will get the AKS credentials?
The init.sh file has the following issues:
On line# 25 and 26, the export command is not able to assign the right value to the ACR_USERNAME and ACR_PASSWORD variables because the 'az acr credential show ... ' commands are not between
.
On line# 38, the ACR_USERNAME variable does not has a '$' sign before that. So, instead of printing the value, it is just printing the variable name.
On line# 40, the value to displayed should be $AKS_NAME and not $ACR_NAME
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.