Quantcast
Channel: VIRL
Viewing all articles
Browse latest Browse all 1811

How to Install VIRL on Packet (Box Cutter)

$
0
0

@alejo wrote:

Summary

This post will guide you with steps needed to deploy a cloud instance of VIRL to packet.net without having VIRL already installed. 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!

Why use this method

You may or may not be new to VIRL, but you may be looking to keep the initial cost down. Or you may not have hardware powerful enough to run large real world topologies. This method gives you direct access to a powerful server where you can run VIRL (bare-metal) and test large simulations without the need of a local VIRL instance. If you do not already own a VMWare product to run VIRL, and you rather not purchase another application then this method is for you.

Before we begin

You may need to install a couple of applications, but don't worry these are free of charge

  • You will also need a Git client for the initial download of our files. If you are familiar with Git, just clone from the URL provided. If you are not, then I would recommend to download and install SmartGit.

Getting started

See it done!
Locate or download your VIRL license file and it keep it handy. We will need it during the installation.
Make sure your Vagrant plugin is up to date for your appropriate platform by running the following command

For VirtualBox users:
vagrant plugin install virtualbox

For VMWare AppCatalyst users:
vagrant plugin install vmware_appcatalyst

Attention: Please use notepad (Windows) or TextEdit (Mac) when editing configuration files

  1. Log into your packet.net account
  2. Create an API key
  3. Navigate to your local Git repository
    • example: C:\Users\<username>\Documents\GitHub\virl_boxcutter
  4. Copy your VIRL License file (e.g. xxxxxxxx.virl.info.pem) to virl_boxcutter\salt directory in your local Git repository
  5. Rename the copied license file to minion.pem (Windows users: make sure that your Windows explorer settings are set to show file name extensions)
  6. From the virl_boxcutter directory, make a copy of id.conf.orig and rename it id.conf
  7. Open the newly created id.conf file with a text editor
    • Change the id: field to your license ID (the xxxxxxxx part of xxxxxxxx.virl.info.pem)
    • Change the append_domain: field to the ending of your license file. If your license file has en ending of virl30.info.pem, then you would enter virl30.info in the append_domain field. Save the changes and close the file
  8. From the virl_boxcutter directory, make a copy of settings.tf.orig and rename it settings.tf
  9. Open the newly created settings.tf file with a text editor
  10. Open your terminal application or a command prompt if you are on Windows
  11. Change directory to your local Git repository
    • cd Documents\GitHub\virl_boxcutter
    • type: vagrant up

      be patient while the system downloads the VIRL BoxCutter virtual machine, configures and starts it. This will take a few minutes to complete.

  12. Once completed, type the following command to connect to your BoxCutter virtual machine

    • vagrant ssh
    • Windows Users, you will most likely get an output similar to this:

      C:\Users\<user>\Documents\GitHub\virl_boxcutter> vagrant ssh
      'ssh' executable not found in any directories in the %PATH% variable. Is an
      SSH client installed? Try installing Cygwin, MinGW or Git, all of which
      contain an SSH client. Or use your favorite SSH client with the following
      authentication information shown below:
      Host: 127.0.0.1
      Port: 2222
      Username: vagrant
      Private key: C:/Users/<user>/Documents/GitHub/virl_boxcutter/.vagrant/machines/default/virtualbox/private_key
      `

    • Using the Host and Port information above, open PuTTY or you SSH client and connect to your BoxCutter virtual machine. Username and password; vagrant and vagrant

  13. Once logged in to your BoxCutter virtual machine change directory to virl_packet

    • cd virl_packet
  14. (optional) Edit the file password.tf to adjust the passwords to suit your needs. Just stick to numbers and letters for now please!
  15. Review the Disclaimer.txt file for operating rules.
  16. If this is not your first launch of VIRL on Packet, log into to https://app.packet.net and click Manage. You need to ensure that there are no active projects present.
    • If there are projects listed:
      Click on the name of your project listed
      Select "Settings" tab
      Scroll to the bottom of the page and click on the button to 'Delete This Project'
  17. From virl_packet type the following commands:
    • terraform plan . (don't forget the 'dot')
    • terraform apply . (don't forget the 'dot')
      NOTE: The above command initiates the deployment of your VIRL server on Packet. This process typically takes about 30min to complete. Please be patient and wait for the login credentials.

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/vagrant/virl_packet
  3. The client.ovpn file can be copied out to your local box usging this command:
    • cp client.ovpn /vagrant/
  4. Move the client.ovpn file to C:\Program Files\OpenVPN\config directory (Windows)
  5. Launch OpenVPN GUI and 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
  7. If you do not have VM Maestro client installed, you will need to log into UWM and then navigate to VIRL Server > VIRL Software; then select the appropriate VM Maestro version and click "Start installation"
  8. Once complete, you can download the client from http://172.16.11.254/download/

NOTE: Your uwmadmin and guest passwords are in /home/vagrant/virl_packet/passwords.tf file. You may also recall them by running the command terraform show.


Terminating your Packet server

When you're ready to terminate your Packet VIRL server, run the following command from your BoxCutter VM.

  • terraform destroy .
  • exit (closes SSH session to BoxCutter VM)

Next:

  • Log in to the Packet.net portal
  • Review the 'Manage' tab to confirm that the project and server instance has been deleted.
    • If there are projects or servers still listed:
      Click on the name of the project listed
      Under "Servers" tab if a server is listed, click on the "Select Action" dropdown; select "Delete" and click "Apply"
      Select "Settings" tab
      Scroll to the bottom of the page and click on the button to 'Delete This Project'
  • Review the 'SSH Keys' tab and remove any ssh keys that are registered (If any)

Terminating your BoxCutter virtual machine

To terminate your 'virl_boxcutter' VM type the following command from you local command prompt or terminal:

  • 'vagrant halt`

To start up again, repeat the process starting with step 11 under "Getting Started".

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 1811

Trending Articles