This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| clusterName=crfa-external | |
| gcloud container clusters create $clusterName \ | |
| --zone=$zone \ | |
| --addons=HttpLoadBalancing,CloudRun \ | |
| --machine-type=n1-standard-2 \ | |
| --num-nodes=3 \ | |
| --enable-stackdriver-kubernetes | |
| gcloud container clusters get-credentials $clusterName \ | |
| --zone $zone | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -sL https://api.github.com/repos/score-spec/score-humanitec/releases/latest | jq -r .tag_name | |
| INGRESS= | |
| NAMESPACE= | |
| kubectl -n ${NAMESPACE} annotate ingress ${INGRESS} nginx.ingress.kubernetes.io/limit-rps=5 | |
| cat <<EOF > nginx.conf | |
| events {} | |
| http { | |
| server { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Use the official lightweight Python image. | |
| # https://hub.docker.com/_/python | |
| FROM python:3.7-slim | |
| # Allow statements and log messages to immediately appear in the Knative logs | |
| ENV PYTHONUNBUFFERED True | |
| # Copy local code to the container image. | |
| WORKDIR /app | |
| COPY . ./ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| sudo apt update -y | |
| sudo apt upgrade -y | |
| # jq | |
| echo "Installing jq..." | |
| sudo apt install jq -y | |
| # helm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| steps: | |
| - bash: | | |
| docker build \ | |
| -f $(system.defaultWorkingDirectory)/$(projectName)/Dockerfile \ | |
| -t $(registryServerName)/$(imageName):$(build.buildId) \ | |
| $(system.defaultWorkingDirectory)/$(projectName) | |
| failOnStderr: true | |
| displayName: 'docker build' | |
| - bash: | | |
| echo $(registryPassword) | docker login \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| sudo apt update -y | |
| sudo apt upgrade -y | |
| sudo apt autoremove -y | |
| repo='kubernetes/kubernetes' | |
| echo $repo '(v1.22.5, v1.21.8, v1.20.14, v1.19.16)' | |
| curl -s https://api.github.com/repos/$repo/releases | jq -r '[.[] | select(.prerelease == false and (.tag_name | startswith("v1.22")))] | .[0].tag_name' | |
| curl -s https://api.github.com/repos/$repo/releases | jq -r '[.[] | select(.prerelease == false and (.tag_name | startswith("v1.21")))] | .[0].tag_name' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Microsoft.Azure.WebJobs; | |
| using Microsoft.Azure.WebJobs.Extensions.Http; | |
| using Microsoft.Azure.WebJobs.Host; | |
| using Newtonsoft.Json; | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Net; | |
| using System.Net.Http; | |
| using System.Text; | |
| using System.Threading.Tasks; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #This script has been inspired by this resource: https://michaelcollier.wordpress.com/2017/05/03/copy-managed-images/ | |
| #But maybe this new Private Preview feature will help in the future? https://azure.microsoft.com/en-us/blog/shared-image-gallery-now-in-limited-public-preview/ | |
| #Source: | |
| SourceSubscriptionId=? | |
| RG=mylinuxvm | |
| VM=mylinuxvm | |
| LOC=canadaeast | |
| SNAP=mylinuxmsnapshot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Microsoft.Azure.WebJobs; | |
| using Microsoft.Azure.WebJobs.Extensions.Http; | |
| using Microsoft.Azure.WebJobs.Host; | |
| using System; | |
| using System.Drawing; | |
| using System.IO; | |
| using System.Net; | |
| using System.Net.Http; | |
| using System.Text.RegularExpressions; | |
| using System.Threading.Tasks; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "$connections": { | |
| "value": { | |
| "blogger": { | |
| "connectionId": "/subscriptions/071eb531-0874-4eaf-823d-0a2d0d711d56/resourceGroups/MyMonthlyBlogArticle/providers/Microsoft.Web/connections/blogger", | |
| "connectionName": "blogger", | |
| "id": "/subscriptions/071eb531-0874-4eaf-823d-0a2d0d711d56/providers/Microsoft.Web/locations/eastus/managedApis/blogger" | |
| }, | |
| "linkedin": { | |
| "connectionId": "/subscriptions/071eb531-0874-4eaf-823d-0a2d0d711d56/resourceGroups/MyMonthlyBlogArticle/providers/Microsoft.Web/connections/linkedin", |