In case you do not want to install MontiThings on your own machine, you can try MontiThings in a virtual machine provided by Microsoft Azure. Note: Costs may be incurred in the process! Use at your own responsibility! This guide is based on the guide from the Microsoft Azure Docs, but adapted for MontiThings.
- Microsoft Azure CLI
- Terraform
- An SSH key (by default it is expected at
~/.ssh/id_rsa.pub)
First you need to log into Azure and initialize Terraform to make sure everything is correctly installed and setup:
az login
terraform init
Then you can plan your deployment, i.e. dry-run it and get a preview of what Terraform will actually do. These will be used by the virtual machine to download and install MontiThings.
terraform plan -out terraform_azure.tfplan
If your SSH key is not at ~/.ssh/id_rsa, please provide its location as an
argument.
terraform plan -out terraform_azure.tfplan -var 'rsa_key_location=/path/to/id_rsa'
Here, make sure that you're happy with all the services Terraform will install. If you want to know more about the individual services, refer to the excellent documentation from the Microsoft Azure Docs.
If you're happy, deploy the virtual machine by calling:
terraform apply terraform_azure.tfplan
You will see how Terraform first instantiates the virtual machine and then installs MontiThings on this machine. At the end, the script shows you the virtual machine's IP. In case you forget it, you can find out the virtual machine's IP address by calling:
az vm show --resource-group montithingsResourceGroup --name montithings -d --query [publicIps] -o tsv
To connect to the machine, call:
ssh azureuser@20.30.40.50
^---------^
replace this with the IP that was output by the script
After the installation you can use MontiThings as if it was installed using a native installation. For example, you can follow the "Building and Running Your First Application" tutorial below.
When you are done, you can instruct Terraform to destroy all resources so that no further costs are incurred:
terraform destroy
Double check that everything was correctly deleted in your Azure account just to make sure no further costs are incurred.