How to: Install VIRL on Packet (Typical)

    Applicable VIRL versions: 1.1.1 or lower

    For VIRL 1.2.5 and later please refer to new feature Remote Server Panel of release notes

    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!
    Don't forget, you still need the VIRL client (VM Maestro) from your local installation in order to use VIRL on Packet.
    If this is your first time with VIRL be sure to download the appropriate version for your platform. It would be a good idea to take a look at some of our Video Demonstrations

    Getting started:

    Using a licensed VIRL server to deploy a bare-metal instance on Packet

    1. 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
    2. Log into your packet.net account
    3. Create an API key
    4. 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" {
        description = "get your packet api key at https://app.packet.net/portal#/api-keys"
        default = "bad_api_key" <<====
        }
        Replace"bad_api_key" with your API key from https://app.packet.net/portal#/api-keys
      • (Optional) you may adjust "packet_machine_type" or "dead_mans_timer" as needed. (More about 'Dead Man's Timer')
      • (Optional) Set destination Data Center as outlined in the settings.tf file. Make sure to updatesalt_master if you decide to change packet_location. The new Data Centers are: sjc1 (SanJose) and ams1 (Amsterdam). The default values will deploy your Packet server to New York (ewr1) Data Center.
        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
    5. Check your configuration:
      • terraform plan .
    6. 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.
    7. 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

    1. Install the OpenVPN client appropriate for your system.
    2. You will find the file 'client.ovpn' under /home/virl/virl_packet
    3. The 'client.ovpn' file can be copied out to other devices, such as a laptop hosting your local VIRL instance.
    4. Download the file and open it with your OpenVPN client
    5. Start the tunnel to connect
    6. Once the tunnel is connected, open a browser to http://172.16.11.254
      • When 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 command terraform show.

    Troubleshooting

    If you run into problems with launching your VIRL server on Packet, take a look at the T-Shoot thread first. If you do not find an answer to your problem please start a new thread with details of the problem and steps you have already taken to resolve. If the problem happens mid-deployment please be sure to include the step where it failed and any error messages returned.