This file contains 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
trigger: | |
- main | |
jobs: | |
- job: Build | |
steps: | |
- checkout: none | |
- script: | | |
touch textfile | |
echo Building > textfile |
This file contains 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
############################################################################# | |
# TERRAFORM PROVIDERS | |
############################################################################# | |
terraform { | |
required_providers { | |
azurerm = { | |
source = "hashicorp/azurerm" | |
version = "~> 2.0" | |
} |
This file contains 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
Name = "apparm-sample-profile" | |
[Filesystem] | |
# read only paths for the container | |
ReadOnlyPaths = [ | |
"/bin/**", | |
"/boot/**", | |
"/dev/**", | |
"/var/**", | |
] |
This file contains 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
apiVersion: networking.istio.io/v1alpha3 | |
kind: VirtualService | |
metadata: | |
name: flaskvirtualservice | |
spec: | |
hosts: | |
- "flask.example.com" # destination hosts to which traffic is being sent. The hosts field applies to both HTTP and TCP services | |
gateways: | |
- flask-gateway | |
http: |
This file contains 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
apiVersion: networking.istio.io/v1alpha3 | |
kind: VirtualService | |
metadata: | |
name: flaskvirtualservice | |
spec: | |
hosts: | |
- "flask.example.com" # destination hosts to which traffic is being sent. The hosts field applies to both HTTP and TCP services | |
gateways: | |
- flask-gateway | |
http: |
This file contains 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
apiVersion: networking.istio.io/v1alpha3 | |
kind: Gateway | |
metadata: | |
name: flask-gateway | |
spec: | |
selector: | |
istio: ingressgateway # use Istio default gateway implementation | |
servers: | |
- port: | |
number: 80 |
This file contains 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 -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - | |
cat <<EOF | sudo tee /etc/apt/sources.list.d/kubernetes.list | |
deb https://apt.kubernetes.io/ kubernetes-xenial main | |
EOF | |
sudo apt-get -y update | |
sudo apt-get install -y kubelet kubeadm kubectl | |
sudo kubeadm config images pull | |
kubeadm init --pod-network-cidr=192.168.0.0/16 |
This file contains 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
- stage: TERRAFORM_DESTROY | |
condition: and(eq('${{ parameters.actionToPerform }}', 'Destroy'), eq(variables.isMain, true)) | |
displayName: TERRAFORM_DESTROY | |
jobs: | |
- deployment: Remove_VNET | |
displayName: Destroy Using Terraform | |
timeoutInMinutes: 30 | |
environment: '${{ parameters.envName }}' | |
strategy: | |
runOnce: |
This file contains 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
RESOURCE_GROUP_NAME=rg-terraform | |
STORAGE_ACCOUNT_NAME=tf-poc | |
CONTAINER_NAME=terraform | |
# Create resource group | |
az group create --name $RESOURCE_GROUP_NAME --location eastus | |
# Create storage account | |
az storage account create --resource-group $RESOURCE_GROUP_NAME --name $STORAGE_ACCOUNT_NAME --sku Standard_LRS --encryption-services blob |
This file contains 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
stages: | |
- stage: TERRAFORM_RUN | |
condition: and(eq('${{ parameters.actionToPerform }}', 'Deploy'), eq(variables.isMain, true)) | |
displayName: TERRAFORM_RUN | |
jobs: | |
- deployment: VNET_Deployment | |
displayName: VNET Deployment Using Terraform | |
timeoutInMinutes: 30 | |
environment: '${{ parameters.envName }}' |
NewerOlder