Before starting on automating our network appliance, we first need to initialize it and allow remote connections over SSH.
Open the OpenShift Web Console, then navigate to Virtualization > VirtualMachines, and select the virtual machine named cisco-8000v.
Select the Console tab, and switch from the VNC console to the Serial console. You may need to hit enter in the box a few times to see output
Note:
If prompted to continue with the initial configuration, type
no
and hit enter. This is also called out later.
Within the serial console, we’ll execute a few steps to allow SSH access to the network appliance from Ansible Controller.
First, type no
to canel the intial configuration dialog:
Next, type enable
and config t
to begin configuring the appliance. You will not be prompted for an enable password.
enable
config t
While in config mode, enter the following to allow for configuration and authentication over SSH:
line vty 0 4
transport input ssh
login local
exit
Next, we’ll set up a user that Ansible can use later on to authenticate to the appliance. In addition, we’ll generate a keypair, and enable SSH version 2.
In the serial console, enter the following commands:
username ansible privilege 15 secret ENTERAPASSWORDHERE
crypto key generate rsa modulus 2048
ip ssh version 2
Ensure to replace ENTERAPASSWORDHERE
with a password of your choosing. It may make sense to use the same password as your credentials for the OpenShift Web UI, just for consistency.
Finally, once complete, exit out of config mode, and save the running configuration to memory:
exit
write memory
Once the process is complete, the console should print out [OK]
.
Navigation