Using Docker Hub

Deploying Avi SE from the Docker Hub is the default action. However it does require the server to have internet access to Docker Hub as it will download the image.

Steps

  1. Install the Avi SE role on the host you are executing from.
sudo ansible-galaxy -f avinetworks.avise
  1. Identify how we want to define our hosts. Ansible can accept hosts three ways: command-line, by inventory file, or by dynamic inventory file. We will use an inventory in this case. Ansible by default uses /etc/ansible/hosts as it’s default inventory. Lets add this segment to the bottom of the page.
[service_engines]
10.120.202.56

Replace the IP with the IP of your baremetal host you want to deploy to.

  1. Create the playbook. It should look similar to this
# myplaybook.yml
---
- hosts: service_engines
  become: true
  roles:
    - role: avinetworks.avise
      se_master_ctl_ip: 10.120.202.24
      se_master_ctl_username: admin
      se_master_ctl_password: avi123
      se_disk_gb: 60
      se_cores: 2
      se_memory_gb: 4

However, there are are many possible values which can be found on the roles README file (https://github.com/avinetworks/ansible-role-avise). Each one allows customization of the deployment.

We will automatically use the se_master_ctl_ip, se_master_ctl_username, and se_master_ctl_password to authenticate, and autoregister the service engine to the controllers default cloud. To choose which cloud you want please use the se_cloud_name value. If you use multiple tenants please use se_tenant to choose the specific tenant the cloud is under.

  1. Verify your local user has access to the hosts you are deploying the controller to. You will need sudo access as well. Login using your current user to make sure you can login. Make sure to logout when done to execute your playbook from your hose.
ssh 10.120.202.56
  1. Execute the playbook.

Note

  • If you are not using an ssh-key you will also need to specify –ask-pass to ansible.
  • If your current user is different you will need to specify -u <username> to ansible.
ansible-playbook myplaybook.yml -u <username> --ask-pass