E11y Provisioning POC
This is a basic first swing at a POC for e11y account using skeema for schema creation We still need to add a global call (if needed) and a call to the PDDB endpoint on the proxy, but there is prior art for all of that
Setup
- Install pyenv and pyenv-virtualenv from Homebrew. (You will need to modify your .bash_profile after doing it, see the brew install output)
- Install python 3.8.0:
pyenv install 3.8.0
- Install mysql8 in whatever way you prefer, and create a user named skeema with the password Pardot07
- Install Skeema from Homebrew
- Create a virtualenv for e11y:
pyenv virtualenv 3.8.0 e11y2
- git clone this repo
cd top/level/of/this/project; pyenv local e11y2
(This will make the e11y virtual environment activated whenever you enter this directory)cd provisioning; sudo pip install -r requirements.txt [--ignore-installed]
cd ../skeema_files; skeema init -u skeema -pPardot07 -h localhost
Running the app
In a separate terminal window, cd to the provisioning folder (where this file is)
python app.py
Testing the API
In a separate terminal window, make a post to the endpoint, and check to see if a new schema was created in the database
curl -i -H "Content-Type: application/json" -X POST -d '{"sName":"54552"}' http://localhost:5000/e11y/api/createSchema
Then drop all the tables with the deprovisioning call
curl -i -H "Content-Type: application/json" -X POST -d '{"sName":"54552"}' http://localhost:5000/e11y/api/deleteSchema