7. Create a Windows Virtual Machine on AWS to Deploy ArmoniK Core

7.1. Step 1: Launch an EC2 Instance

  1. Access the EC2 Console:

    • Navigate to the EC2 Dashboard in the AWS Management Console.

    • Click on the “Launch Instance” button.

  2. Select an Amazon Machine Image (AMI):

    • Choose the “Microsoft Windows Server 2022 Base” AMI, which is the latest stable version.

  3. Choose an Instance Type:

    • Select an instance type with a significant amount of RAM, such as c5.9xlarge, to ensure optimal performance to deploy ArmoniK.

  4. Configure Key Pair:

    • You can either use an existing key pair or create a new one for SSH access.This key pair will be used to decrypt the administrator password.

  5. Configure Security Group:

    • Allow HTTP and HTTPS traffic from the internet to ensure accessibility.

  6. Launch the Instance:

    • Review and launch the instance.

7.2. Step 2: Connect to Your Instance

  1. Connect to your instance:

    • Go to the instance’s page and click on the “Connect” button.

    • Download the RDP file from the “RDP Client” menu.

    • Click on “Get Password” and upload your private key file to retrieve the administrator password.

  2. Remote Desktop Connection:

    • Open the RDP file and enter the retrieved password to connect to your Windows VM.

7.3. Step 3: Install Docker Engine

Note: Docker Desktop is not supported on Windows Server. Instead, install Docker Engine.

Open PowerShell as Administrator:

Run the following commands to install Docker:

Invoke-WebRequest -Uri https://get.mirantis.com/install.ps1 -OutFile install.ps1
.\install.ps1

You should see output similar to the following:

    Installing the containers feature. It is a prerequisite for containers on Windows and requires a reboot.
    Downloading Docker zip into C:\Program Files\fdc619c6-4cbe-445b-a58d-834f7f2e7fe6.zip from: https://repos.mirantis.com/win/static/stable-25.0/x86_64/docker-25.0.8.zip - this may take some time
    Download of package Docker finished
    Downloading Containerd zip into C:\Program Files\988b10eb-b644-4831-874b-87d9fa8fe670.zip from: https://repos.mirantis.com/win/static/stable-25.0/x86_64/containerd-1.6.36m1.zip - this may take some time
    Download of package Containerd finished
    Using preloaded zip File C:\Program Files\fdc619c6-4cbe-445b-a58d-834f7f2e7fe6.zip for installing package Docker
    Using preloaded zip File C:\Program Files\988b10eb-b644-4831-874b-87d9fa8fe670.zip for installing package Containerd
    Installed Docker 25.0.7m2, build caad55120f42270f09cf95baeb33ea99b675a771
    Installed Containerd 1.6.36m1
    Install/upgrade completed

Reboot the Machine:

  • Run the following command to reboot:

Restart-Computer

Warning: Never shut down the VM; it may be impossible to restart it again.

Verify Docker Installation:

After the reboot, open PowerShell and run:

docker --version
docker run hello-world:nanoserver

7.4. Step 4: Install Chocolatey

  • Open PowerShell as Administrator:

  • Run the following commands to install Chocolatey:

Set-ExecutionPolicy Bypass -Scope Process -Force; `
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; `
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

7.4.1. Install Additional Tools:

Use Chocolatey to install necessary tools:

choco install just --confirm
choco install terraform --confirm
choco install mongodb-shell -y
choco install 7zip -y
choco install terraform --version=1.10.1 -y

Verify Installation:

Check the installation of tools like just:

just --version

7.5. Step 5: Install Visual Studio Code and Git

7.6. Step 6: Configure SSH Key

  • Generate SSH Key:

  • Open PowerShell and run:

ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

Add SSH Key to GitHub:

  • Copy the generated SSH public key and add it to your GitHub account to enable SSH access.

7.7. Step 7: Deploy ArmoniK Core

Clone Your Repository: Use Git to clone your repository via SSH.

  • Deploy ArmoniK Core: Run the following command to deploy ArmoniK Core locally:

just -v tag=<your-tag> object=local worker=htcmock ingress=false prometheus=false grafana=false seq=false queue=rabbitmq deploy
  • The <your-tag> corresponds to the version of the Armonik.Core image you want to deploy. This should match the version of the image that has been built and pushed to your container registry. For example, it could be something like 0.31.0.

  • Specify the appropriate tag for your deployment to ensure that the correct version of the ArmoniK.Core image is used.

7.7.1. Example

If you want to deploy version 0.31.0 of the ArmoniK.Core image, you would run:

just -v tag=0.31.0 object=local worker=htcmock ingress=false prometheus=false grafana=false seq=false queue=rabbitmq deploy