In this repo, you'll find some resources to get you quickly started on developing an ACI App.
- A sample stateless app (Cisco_DemoApp)
- A sample stateful app (Cisco_DemoStatefulApp)
- Tools provided by Cisco to develop an ACI App.
- Quick tutorial to use the tools.
First, download the pacakge the ACI App Tools package from DevNet (cisco_aci_app_tools-1.1.tar.gz
).
A few libraries and commands need to be installed prior to the usage of the tools.
gcc
g++
make
libffi-dev
openssl-dev
(orlibssl-dev
)python-dev
zip
libmagic
- On macOS: Use the packet manager "Homebrew":
$ brew install libmagic
- Sometimes already present in Linux
- On macOS: Use the packet manager "Homebrew":
pip
virtualenv
Also, we need to install the python libraries. The easiest way is to create a virtualenv
(for python 2.7):
virtualenv aciapptools
source aciapptools/bin/activate
(aciapptools) pip install tools/resources/cisco_aci_app_tools-1.1.tar.gz
The tools are located in tools/resources/cisco_aci_app_tools-1.1.tar.gz
. First, uncompress the archive. The tools are then located inside the tools/
directory.
Alternatively, you can use the docker image provided to run the tools.
To use it, a few steps are required to get started:
- Install docker
cd
into thetools
directory of this repo.- Create the docker image. Run the command:
docker build . -t aciappcenter-tools:latest
- Upon the successful completion of the
docker build
command, you can check that the docker image has been generated (docker images
). - Run the container using the command:
docker run -it -d -v <LOCAL_FOLDER>:<FOLDER_IN_CONTAINER> --name aciapptools aciappcenter-tools:latest
This command uses the -v
parameter to mount a local directory into the container. That way, any file created in <FOLDER_IN_CONTAINER>
will be present on your machine (in <LOCAL_FOLDER>
) and vice versa.
The creator is launched using this command:
python aci_app_creator.py -o <OUTPUT_FOLDER>
The -o
parameter is optional.
- Run the following command:
docker exec -it aciapptools python tools/aci_app_creator.py -o <FOLDER_IN_CONTAINER>
- You'll find the resulting app in
<LOCAL_FOLDER>
The packager is launched using this command:
python aci_app_packager.py -f <PATH_TO_APP_ROOT_DIRECTORY>
The -f
parameter is mandatory.
- Put your app in
<LOCAL_FOLDER>
- Run the following command:
docker exec -it aciapptools python tools/aci_app_packager.py -f <FOLDER_IN_CONTAINER>
- You'll find the packaged add in
<LOCAL_FOLDER>