Skip to content

FServais/aciapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ACI AppCenter Apps and Tools

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.

Tools

Prerequisites

First, download the pacakge the ACI App Tools package from DevNet (cisco_aci_app_tools-1.1.tar.gz).

UNIX (Linux, macOS,...)

A few libraries and commands need to be installed prior to the usage of the tools.

  • gcc
  • g++
  • make
  • libffi-dev
  • openssl-dev (or libssl-dev)
  • python-dev
  • zip
  • libmagic
    • On macOS: Use the packet manager "Homebrew": $ brew install libmagic
    • Sometimes already present in Linux
  • pip
  • virtualenv

Also, we need to install the python libraries. The easiest way is to create a virtualenv (for python 2.7):

  1. virtualenv aciapptools
  2. source aciapptools/bin/activate
  3. (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.

Docker

Alternatively, you can use the docker image provided to run the tools.

To use it, a few steps are required to get started:

  1. Install docker
  2. cd into the tools directory of this repo.
  3. Create the docker image. Run the command:
docker build . -t aciappcenter-tools:latest
  1. Upon the successful completion of the docker build command, you can check that the docker image has been generated (docker images).
  2. 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.

ACI App Creator

UNIX (Linux, macOS,...)

The creator is launched using this command:

python aci_app_creator.py -o <OUTPUT_FOLDER>

The -o parameter is optional.

Using docker container

  1. Run the following command:
docker exec -it aciapptools python tools/aci_app_creator.py -o <FOLDER_IN_CONTAINER>
  1. You'll find the resulting app in <LOCAL_FOLDER>

ACI App Packager

UNIX (Linux, macOS,...)

The packager is launched using this command:

python aci_app_packager.py -f <PATH_TO_APP_ROOT_DIRECTORY>

The -f parameter is mandatory.

Using docker container

  1. Put your app in <LOCAL_FOLDER>
  2. Run the following command:
docker exec -it aciapptools python tools/aci_app_packager.py -f <FOLDER_IN_CONTAINER>
  1. You'll find the packaged add in <LOCAL_FOLDER>

About

Check out this demo ACI App to get you started.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published