Salt Lab Guide
Salt Lab Guide
Installation
MASTER
https://repo.saltproject.io/#ubuntu
MINION
https://repo.saltproject.io/#ubuntu
CONFIGURATION
LOCATION
MASTER - /etc/salt/master
MINION - /etc/salt/minion
MASTER
salt-key -F master
Copy the master.pub fingerprint from the Local Keys section, and then set this value as the
master_finger in the minion configuration file. Save the configuration file and then restart
the Salt minion.
MINION
Add the host IP addresses of master node as
<IP ADDRESS> salt
Go back to MASTER
[root@master ~]# salt-key -L
Unaccepted Keys:
minion
Accepted Keys:
junos in /srv/pillar/junos.sls
proxy:
proxytype: napalm
driver: junos
host: 192.168.30.137
username: apnic
password: apricot2022
base:
ios:
- ios
- r1_data
junos:
- junos
- r2_data
junos2:
- junos2
- r2_data
'*':
- common_data
Go back to MASTER
[root@master ~]# salt-key -L
Unaccepted Keys:
ios
junos
Accepted Keys:
Add some varibles for ios as r1_data, junos as r2_data and common in common_data
In file /srv/pillar/r1_data.sls
asn: 65500
router_id: "100.100.100.0"
interfaces:
- interface_name: "Ethernet1/1"
description: "### Peering with Customer01 ###"
ipv4_address: "100.100.100.0"
ipv4_netmask: "255.255.255.254"
ipv6_address: "2001:DB8:100::"
ipv6_netmask: 127
bgp_peers:
- v4_peers:
- peer_address: "100.100.100.1"
peer_as: 63932
peer_description: "IPv4 eBGP with Customer01"
peer_password: "apricot2022"
- v6_peers:
- peer_address: "2001:DB8:100::1"
peer_as: 63932
peer_description: "IPv6 eBGP with Customer01"
peer_password: "apricot2022"
In file /srv/pillar/r2_data.sls
asn: 65500
router_id: "100.100.200.0"
hostname: "R2"
interfaces:
- interface_name: ge-0/0/0
description: "Peering-with-Customer01"
ipv4_address: "100.100.200.0"
ipv4_netmask: 31
ipv6_address: "2001:DB8:200::"
ipv6_netmask: 127
bgp_peers:
- v4_peers:
- peer_address: "100.100.100.1"
peer_as: 63932
peer_description: "IPv4 eBGP with Customer01"
peer_password: "apricot2022"
- v6_peers:
- peer_address: "2001:DB8:100::1"
peer_as: 63932
peer_description: "IPv6 eBGP with Customer01"
peer_password: "apricot2022"
In file /srv/pillar/common_data.sls
ntp_servers:
- 192.168.0.250
- 192.168.0.251
dns_servers:
- 192.168.0.253
- 192.168.0.254