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
| /// Several types of consoles | |
| type Console = | |
| | Playstation_5 | |
| | Xbox_Series_X | |
| | Switch | |
| with | |
| member this.Name = | |
| match this with | |
| | Playstation_5 -> "Playstation 5" | |
| | Xbox_Series_X -> "XBox Series X" |
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
| #r "nuget: Farmer, 1.6.0" | |
| open Farmer | |
| open Farmer.Builders | |
| open Farmer.Builders.ContainerGroups | |
| open Farmer.Builders.TrafficManager | |
| open Farmer.TrafficManager | |
| let msi = userAssignedIdentity { | |
| name "my-app" |
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
| #r "nuget: Farmer" | |
| open Farmer | |
| // Give it a resource type. This is helpful the resource and handling dependencies. | |
| let rightClickDeployments = ResourceType ("Microsoft.Hi/rightClickDeployments", "2021-06-29") | |
| // Define the resource itself. | |
| let minimalResource = | |
| { new IArmResource with |
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
| #r "nuget: Farmer" | |
| #r "nuget: FSharp.Text.Docker" | |
| open System | |
| open Farmer | |
| open Farmer.Builders | |
| open FSharp.Text.Docker.Dockerfile | |
| // Create Container Registry | |
| let myAcr = |
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
| #r "nuget: FsCloudInit" | |
| #r "nuget: DiscUtils.Containers" | |
| open System | |
| open System.IO | |
| open FsCloudInit | |
| open FsCloudInit.Builders | |
| open DiscUtils | |
| open YamlDotNet.Serialization |
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
| #r "nuget:Farmer" | |
| open Farmer | |
| open Farmer.Builders | |
| // Sometimes resources aren't available in certain regions and another location needs to be chosen. | |
| // The best way to do this is to create a nested resource group deployment to the _same_ resource | |
| // group, and choose a different location for that nested deployment | |
| arm { |
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
| set -eux | |
| python3 -m venv $HOME/venvs/azure-cli | |
| source venvs/azure-cli/bin/activate | |
| pip install --upgrade pip | |
| pip install azure-cli | |
| deactivate |
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
| #r "../../src/Farmer/bin/Debug/net5.0/Farmer.dll" | |
| #r "nuget: FSharp.Text.Docker" | |
| open System | |
| open Farmer | |
| open Farmer.ContainerApp | |
| open Farmer.Builders | |
| open FSharp.Text.Docker.Builders | |
| // Create Container Registry |
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
| type Step = | |
| | Action of string | |
| | Branch of Step list list | |
| type Plan = | |
| { | |
| Name : string | |
| Steps : Step list | |
| } |
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
| # default target so running 'make' by itself wll download and build nginx | |
| build: nginx | |
| cd nginx && ./configure --with-pcre=../pcre2 && make | |
| nginx: pcre2 | |
| curl -O https://nginx.org/download/nginx-1.21.6.tar.gz | |
| tar -xzvf nginx-*.tar.gz | |
| mv nginx-*/ nginx | |
| rm nginx-*.tar.gz |