ACI Endpoint Tracker using ACI Toolkit.
1.2K
Cisco ACI Endpoint Tracker, leveraging ACIToolkit.
This dockerfile provides the ability to launch either a polling agent or a GUI Server.
The following environment variables must be defined based on mode.
In the case that the GUI variable is not defined, it will default to a polling agent.
To simplify command lines below, you can utilize an environment variable file to supply variables to containers. This file provides a simple NAME=VALUE listing.
Create a file under /opt/ or a path of your choosing called acienv.list and ensure it has the following contents.
APICUSERNAME=usernamehere
APICPASSWORD=passwordhere
MYSQLIP=ipofmysqlordockerhostiphere
MYSQLADMINLOGIN=adminloginnamehere
MYSQLPASSWORD=adminpasswordhere
Use "with environment file" steps below.
Both the polling agent and the GUI server require access to the same backend MySQL server(s). The following deployment is not indicative of full production impelemntations, but is an example start. This method of deployment will map the database storage location to an external path allowing upgrades of MySQL to occurr without losing data. (Ensure you still backup as required for retention.)
Create DB File path
sudo mkdir /opt/mysqldata
Adjust File Path Permissions
sudo chown root:docker /opt/mysqldata
sudo chmod u=rwX,g=rX,o=rX /opt/mysqldata
Deploy MySQL Container
Without environment file:
sudo docker run -p 3306:3306 -d --name acidb --restart always -v /opt/mysqldata:/var/lib/mysql:rw -e MYSQL_RANDOM_ROOT_PASSWORD=yes -e MYSQL_DATABASE=endpointtracker -e MYSQL_USER={MYSQLADMINLOGIN here} -e MYSQL_PASSWORD={MYSQLPASSWORD here} mysql
With environment file:
sudo docker run -p 3306:3306 -d --name acidb --restart always -v /opt/mysqldata:/var/lib/mysql:rw --env-file /path/to/acienv.list mysql
Without environment file:
sudo docker run -d --name acipollingagent --restart always --read-only -e APICURL={http://iporfqdnhere} -e APICUSERNAME={usernamehere} -e APICPASSWORD={passwordhere} -e MYSQLIP={mysqliphere} -e MYSQLADMINLOGIN={MYSQLADMINLOGIN here} -e MYSQL_PASSWORD={MYSQLPASSWORD here} jhardison/aciendpointtracker
With environment file:
sudo docker run -d --name acipollingagent --restart always --read-only --env-file /path/to/acienv.list jhardison/aciendpointtracker
The deployment of the GUI in the following steps assumes the port being used to map to the container is standard HTTP(80). If you need an alternate port, configure as needed.
Without environment file:
sudo docker run -p 80:80 -d --name aciguiserver --restart always --read-only -e GUI=true -e MYSQLIP={mysqliphere} -e MYSQLADMINLOGIN={MYSQLADMINLOGIN here} -e MYSQL_PASSWORD={MYSQLPASSWORD here} jhardison/aciendpointtracker
With environment file:
sudo docker run -p 80:80 -d --name aciguiserver --restart always --read-only -e GUI=true --env-file /path/to/acienv.list jhardison/aciendpointtracker
With the components deployed, you should now be able to open the web console for the GUI. Browse to the following path to test access:
http://ipofdockerhost or if using a custom port, http://ipofdockerhost:portusedhere
All the deployed containers logs can be viewed through the use of the following command.
sudo docker logs acidb
sudo docker logs acipollingagent
sudo docker logs aciguiserver
While other methods should be employed to consolidate logs and ship to external services such as a central syslog server, this provides an immediate bare minimum method to troubleshoot containers.
Content type
Image
Digest
Size
64 MB
Last updated
over 8 years ago
docker pull jhardison/aciendpointtracker