@alejo wrote:
Summary
This post will guide you with steps needed to deploy a cloud instance of VIRL to packet.net. Make sure you have already followed all the pre-requisite steps needed before you attempt to deploy your cloud instance.
For more information please take a look at our announcement thread!Getting started:
Using a licensed VIRL server to deploy a bare-metal instance on Packet
- Run the following commands from your VIRL server
sudo vinstall salt
sudo apt-get install -y pwgen
sudo salt-call state.sls virl.terraform
cd virl_packet
- Log into your packet.net account
- Create an API key
- From your VIRL server edit the
settings.tf
file located in/home/virl/virl_packet
sudo nano /home/virl/virl_packet/settings.tf
- Edit this section:
variable "packet_api_key" {
Replace
description = "get your packet api key at https://app.packet.net/portal#/api-keys"
default = "bad_api_key" <<====
}"bad_api_key"
with the API key you created in Packet and save the file
IMPORTANT: make sure to include the '.' in the next two commands. You should still be in/home/virl/virl_packet
directory. If you are not sure, run this command:pwd
- Check your configuration:
terraform plan .
- Deploy your server:
terraform apply .
Your bare-metal server will now be provisioned and once the process completes you will be given log in information. This process typically takes about 30 minutes to complete.- If you missed the log in information run this command at anytime to recall it:
terraform show
Subsequent launches will only need to follow steps 5 -7
Connecting to your Packet Server:
(See it done -- link coming soon)
Your new bare-metal server is provisioned securely. In order to access your server you will need to establish an OpenVPN tunnel from your computer to your Packet server.Take a look at this post for more detail on installing OpenVPN
- Install the OpenVPN client appropriate for your system.
- You will find the file 'client.ovpn' under
/home/virl/virl_packet
- The 'client.ovpn' file can be copied out to other devices, such as a laptop hosting your local VIRL instance.
- Download the file and open it with your OpenVPN client
- Start the tunnel to connect
- Once the tunnel is connected, open a browser to http://172.16.11.254
- If using VM Maestro don't forget to change the connection profile to point to your Packet server; http://172.16.11.254
Terminating your Packet server
When you're ready to terminate your Packet VIRL server, run the following commands from your LOCAL VIRL server:
terraform destroy .
Next:
- Log in to the Packet.net portal
- Review the 'Manage' tab to confirm that the server instance has been deleted.
- If necessary, delete the server
- Review the 'SSH Keys' tab and remove any ssh keys that are registered
[NOTE] Your uwmadmin and guest passwords are in
/home/virl/virl_packet/passwords.tf
file. You may also recall them by running the commandterraform show
.
Posts: 1
Participants: 1