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
    
  
  
    
  | mkdir source\repos | |
| cd source\repos | |
| dotnet new helloworld -o aspnetcoreapp | |
| cd helloworld | |
| dotnet run | 
  
    
      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
    
  
  
    
  | cd source/repos | |
| git clone https://[email protected]/YOUR_ORGANIZATION/HelloWorld/_git/HelloWorld helloworld_git | |
| mv -v helloworld/* helloworld_git/ | |
| rm -r helloworld | |
| cd helloworld_git | |
| dotnet new gitignore | 
  
    
      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
    
  
  
    
  | FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim-arm64v8 AS base | |
| WORKDIR /app | |
| EXPOSE 80 | |
| EXPOSE 443 | |
| FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build | |
| WORKDIR /src | |
| COPY *.csproj ./ | |
| RUN dotnet restore | |
| 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
    
  
  
    
  | # Docker | |
| # Build a Docker image | |
| # https://docs.microsoft.com/azure/devops/pipelines/languages/docker | |
| trigger: | |
| - master | |
| resources: | |
| - repo: self | 
  
    
      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
    
  
  
    
  | sudo hostnamectl set-hostname km01 | 
  
    
      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
    
  
  
    
  | sudo sed -i \ | |
| '1 s/.*/& cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory/' \ | |
| /boot/firmware/nobtcmd.txt | |
| sudo reboot | 
  
    
      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
    
  
  
    
  | sudo apt-get update && sudo apt-get install -y apt-transport-https curl | |
| 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 update | |
| sudo apt-get install -y kubelet kubeadm kubectl docker.io | |
| sudo systemctl enable docker.service | 
  
    
      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
    
  
  
    
  | sudo kubeadm init --pod-network-cidr=10.244.0.0/16 | 
  
    
      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
    
  
  
    
  | mkdir -p $HOME/.kube | |
| sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config | |
| sudo chown $(id -u):$(id -g) $HOME/.kube/config | |
| kubectl get node | 
  
    
      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
    
  
  
    
  | kubeadm token create --print-join-command | 
OlderNewer