Skip to content
Snippets Groups Projects
Select Git revision
  • fa1c68dfe2bd876f9a60c720aeed76b9f7827b04
  • develop default protected
  • validate_l2_circuit
  • master protected
  • feature/NAT-1797-netbox-migration
  • authorship-fix-from-develop
  • 1048-service-config-backfilling
  • feature/nat-1211-edgeport-lacp-xmit
  • fix/nat-1120-sdp-validation
  • NAT-1154-import-edge-port-update
  • fix/l3-imports
  • feature/10GGBS-NAT-980
  • fix/NAT-1009/fix-redeploy-base-config-if-there-is-a-vprn
  • 4.27
  • 4.26
  • 4.25
  • 4.24
  • 4.23
  • 4.22
  • 4.21
  • 4.20
  • 4.19
  • 4.18
  • 4.17
  • 4.16
  • 4.15
  • 4.14
  • 4.13
  • 4.12
  • 4.11
  • 4.10
  • 4.8
  • 4.5
33 results

build-docs.sh

Blame
  • install-centos.sh 1.54 KiB
    #!/bin/sh
    #
    # This script installs all dependencies for Firewall-on-Demand running in Python3
    # with Celery, Redis, and sqlite.
    #
    
    echo "Installing epel repo"
    rpm -Uh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
    
    echo "Installing remi repo"
    yum -q -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
    
    echo "Installing base dependencies"
    yum -q -y install python36 python36-setuptools python36-virtualenv vim git gcc libevent-devel libxml2-devel libxslt-devel mariadb-server mysql-devel patch yum-utils
    
    
    echo "Installing redis"
    # Installation of redis from remi RPM repository
    yum-config-manager --enable remi
    yum -q -y install redis
    
    echo "Setup python environment for FoD"
    mkdir -p /var/log/fod /srv
    virtualenv-3 /srv/venv
    (
    	source /srv/venv/bin/activate
    	mkdir -p /srv/flowspy/
    
    	# Select source dir and copy FoD into /srv/flowspy/
    	if [ "`basename "$0"`" = install-centos.sh ]; then
    		# this script is in the source directory
    		cp -r "`dirname $0`"/* /srv/flowspy/
    	elif [ -e /vagrant ]; then
    		# vagrant's copy in /vagrant/
    		cp -r /vagrant/* /srv/flowspy/
    	elif [ -e ./install-centos.sh ]; then
    		# current directory is with the sourcecode
    		cp -r ./* /srv/flowspy/
    	else
    		echo "Could not find FoD src directory tried `dirname $0`, /vagrant/, ./"
    		exit 1
    	fi
    	
    	cd /srv/flowspy/
    	(
    		cd flowspy
    		cp -f settings.py.dist settings.py
    		patch settings.py < settings.py.patch
    	)
    	pip install -r requirements.txt
    
    	touch flowspy/settings_local.py
    
    	./manage.py syncdb --noinput
    	./manage.py migrate
    	./manage.py loaddata initial_data
    )