Please don't read this how to use aclhound on a daily basis, this is just for configuration and installation.
To install the package, execute the following lines on the commandline:
git clone https://github.com/job/aclhound.git cd aclhound virtualenv venv source venv/bin/activate pip install -r requirements.txt sudo python setup.py install sudo cp /etc/aclhound/aclhound.conf.dist /etc/aclhound/aclhound.conf aclhound init make test
Notes:
setup.py
is run with sudo as it writes to/etc/
aclhound init
creates the~/.aclhound
directory- install and configuration are needed for
make test
to run
aclhound.conf
This can be found in the /etc/aclhound/ directory.
This configuration file is used to configure some base settings for aclhound itself, and it contains settings to talk with jenkins & gerrit.
The following is an example configuration file:
; ACLHound system-wide configuration [general] local_only = false policy_output_directory = /opt/aclhound/networkconfigs project_name = [jenkins] hostname = aclhound001 port = 8080 username = aclhound password = [gerrit] hostname = gerrit001 port = 29418 repository = networking protocol = ssh [user] username = location =
~/aclhound/.gitreview
This file is populated during the first/initialization run (see next chapter) of aclhound It contains the parameters to connect to gerrit
Example config:
[gerrit] host=gerrit.remotehost port=29418 project=aclhound-repos.git
.netrc
This file needs to be manually edited. This contains login information to do deployments from the commandline using the aclhound tool (automatic logins) Documentation on .netrc can be found here: http://www.gnu.org/software/inetutils/manual/html_node/The-_002enetrc-File.html
To deploy a clean working directory for ACLHound, login as a normal user on a system which has the ACLHound software installed, and type:
"aclhound init"
This little setup part of ACLHound asks you 3 questions: username, location and whether or not you'd like to clone the repository data (configured in the aclhound.conf)
|
|
- init Initialise aclhound end-user configuration. Initialise user-specific settings, ask the user for username on repository server, location to store aclhound policy, ask to make initial clone. Usage: aclhound [-d] init [--batch] Options: --batch Automatically guess all settings (non-interactive mode). - fetch Retrieve latest ACLHound policy from repository server. - build Compile policy into network configuration, output on STDOUT Show unified build for both IPv4 and IPv6 for a device. Usage: aclhound build aclhound build all Arguments: The device file for which a network config must be generated. Build all network policies into their respective vendor specific representation. Useful as 'review' test in Jenkins. Note: please ensure you run 'build' inside your ACLHound data directory - deploy Deploy compiled configuration to a network device Deploy a compiled version of the ACLs on a network device Usage: aclhound deploy aclhound deploy all Arguments: Hostname of the device on which the generated ACLs must be deployed. ACLHound will take all device files from devices/ (except filenames with a '.ignore' suffix), compile the policy and upload the policies to the device. "all" is suitable for cron or jenkins. Note: please ensure you run 'deploy' inside your ACLHound data directory - reset Delete aclhound directory and fetch copy from repository.