- SmartNetConf is a simple (Web Gui Application) that let you generate a configuration from a (JINJA2 Template and CSV File)
Live apps is available at http://smartnetconf.shellvision.com (This live Apps is deployed on AWS Lambda, so no data will be saved)
** use if there is already a wsgi module for python2, we need to remove it and install wsgi for python 3**
apt remove libapache2-mod-wsgi
apt install apache2 virtualenv
cd /var/www
git clone https://github.com/ShellVision/SmartNetConf.git
cd SmartNetConf
apt -y install libapache2-mod-wsgi-py3
a2enmod wsgi
virtualenv -p python3 ./venv3
source ./venv3/bin/activate
pip install Flask PyYAML
chown www-data:www-data -R /var/www/SmartNetConf
vi /etc/apache2/apache2.conf
if you want to work with Virtual Host, you can use a file named "virtual_HostApacheIfNeeded.conf" in root directory
ln -s /var/www/SmartNetConf/virtual_HostApacheIfNeeded.conf /etc/apache2/sites-available/
a2ensite virtual_HostApacheIfNeeded
WSGIDaemonProcess SmartNetConf user=www-data group=www-data threads=5
WSGIScriptAlias / /var/www/SmartNetConf/SmartNetConf.wsgi
<Directory /var/www/SmartNetConf>
WSGIProcessGroup SmartNetConf
WSGIApplicationGroup %{GLOBAL}
Require all granted
</Directory>
ErrorLog /var/log/apache2/error-SmartNetConf.com.log
CustomLog /var/log/apache2/access-SmartNetConf.com.log combined
WSGIDaemonProcess SmartNetConf user=www-data group=www-data threads=5
WSGIScriptAlias / /var/www/SmartNetConf/SmartNetConf.wsgi
<Directory /var/www/SmartNetConf>
WSGIProcessGroup SmartNetConf
WSGIApplicationGroup %{GLOBAL}
AuthType Basic
AuthName "Restricted Content"
AuthUserFile /var/www/SmartNetConf/.htpasswd_SmartNetConf
Require valid-user
</Directory>
ErrorLog /var/log/apache2/error-SmartNetConf.com.log
CustomLog /var/log/apache2/access-SmartNetConf.com.log combined
htpasswd -c /var/www/SmartNetConf/.htpasswd_SmartNetConf admin
service apache2 restart
tail -f /var/log/apache2/*
Then watch what is the error when you try to access the page
pip install Flask PyYAML zappa
zappa init
#Or you can do it manualy
vi zappa_settings.json and insert :
{
"prod": {
"app_function": "SmartNetConf.app",
"profile_name": "default",
"project_name": "smartnetconf",
"runtime": "python3.6",
"s3_bucket": "smartnetconf-prod"
},
"prod_us_west_2": {
"aws_region": "us-west-2",
"extends": "prod"
}
}
vi ~/.aws/credentials
[default]
aws_access_key_id=XXXXX
aws_secret_access_key=XXXXXX
zappa deploy prod
- jinja2-live-parser - A lightweight live parser for Jinja2 based on Flask and Jquery.
- ACE -Ace is a standalone code editor written in JavaScript
- Other that I may forgot
This project is licensed under the MIT License - see the LICENSE.md file for details