Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FoD
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Schmitz
FoD
Commits
020aefb4
Commit
020aefb4
authored
5 years ago
by
Tomáš Čejka
Browse files
Options
Downloads
Patches
Plain Diff
updated installation by vagrant, preparation for docker-centos
parent
afee9244
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Dockerfile.centos
+1
-20
1 addition, 20 deletions
Dockerfile.centos
Vagrantfile
+16
-43
16 additions, 43 deletions
Vagrantfile
install-centos.sh
+43
-0
43 additions, 0 deletions
install-centos.sh
with
60 additions
and
63 deletions
Dockerfile.centos
+
1
−
20
View file @
020aefb4
FROM centos:latest
FROM centos:latest
#RUN apt-get -yqq update
#RUN apt-get -yqq install virtualenv python python-dev vim git gcc libevent-dev libxml2-dev libxslt-dev patch beanstalkd mariadb-server libmariadb-dev libmariadbclient-dev-compat sqlite3
#RUN apt-get -yqq install procps
# TODO: maybe libmariadb and libmariadbclient might be missing ?
RUN yum -y install python python-virtualenv vim git gcc libevent libevent-devel libxml2 libxml2-devel libxslt libxslt-devel patch mariadb-server mariadb-devel sqlite
# TODO: ugly:
RUN yum -y install http://cbs.centos.org/kojifiles/packages/beanstalkd/1.9/3.el7/x86_64/beanstalkd-1.9-3.el7.x86_64.rpm
RUN yum -y install procps
RUN yum -y install procps
# RUN echo "create database fod;" | mysql -u root
# RUN echo "create database fod;" | mysql -u root
...
@@ -17,16 +7,7 @@ RUN yum -y install procps
...
@@ -17,16 +7,7 @@ RUN yum -y install procps
RUN mkdir -p /var/log/fod /srv
RUN mkdir -p /var/log/fod /srv
COPY . /srv/flowspy
COPY . /srv/flowspy
RUN (cd /srv/flowspy/flowspy && cp -f settings.py.dist settings.py && patch settings.py < settings.py.patch && touch settings_local.py;)
RUN (cd /srv/flowspy; ./install-centos.sh;)
# seems that pip will be available in virtualenv:
RUN (virtualenv /srv/venv && . /srv/venv/bin/activate; cd /srv/flowspy/; pip install -r requirements.txt;)
RUN (cd /srv/flowspy/; ./patch-dependencies.sh;)
RUN (cd /srv/flowspy/; . /srv/venv/bin/activate && \
./manage.py syncdb --noinput && \
./manage.py migrate; ./manage.py loaddata initial_data;)
# echo "To set environment to English, run: export LC_ALL=en_US"
# echo "To set environment to English, run: export LC_ALL=en_US"
# echo "To activate virualenv: source /srv/venv/bin/activate"
# echo "To activate virualenv: source /srv/venv/bin/activate"
...
...
This diff is collapsed.
Click to expand it.
Vagrantfile
+
16
−
43
View file @
020aefb4
...
@@ -51,49 +51,22 @@ Vagrant.configure(2) do |config|
...
@@ -51,49 +51,22 @@ Vagrant.configure(2) do |config|
# vb.memory = "1024"
# vb.memory = "1024"
# end
# end
#
#
config
.
vm
.
provision
"shell"
,
inline:
<<-
SHELL
config
.
vm
.
provision
"shell"
,
path:
"install-centos.sh"
rpm -Uh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum -q -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
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
# Installation of redis from remi RPM repository
yum-config-manager --enable remi
yum -q -y install redis
systemctl enable redis
systemctl start redis
systemctl enable mariadb.service
service mariadb start
mysql -u root <<-SCRIPT
create database fod;
SCRIPT
mkdir -p /var/log/fod /srv
virtualenv-3 /srv/venv
(
source /srv/venv/bin/activate
cp -r /vagrant/ /srv/flowspy
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
)
echo "To set environment to English, run: export LC_ALL=en_US"
echo "To activate virualenv: source /srv/venv/bin/activate"
echo "To create a user run: cd /srv/flowspy; ./manage.py createsuperuser"
echo "To start flowspy server: cd /srv/flowspy; ./manage.py runserver 0.0.0.0:8000"
echo "To start celeryd: cd /srv/flowspy; ./manage.py celeryd"
config
.
vm
.
provision
"shell"
,
inline:
<<-
SHELL
systemctl enable redis
systemctl start redis
# systemctl enable mariadb.service
# service mariadb start
# mysql -u root <<-SCRIPT
#create database fod;
#SCRIPT
echo "To set environment to English, run: export LC_ALL=en_US"
echo "To activate virualenv: source /srv/venv/bin/activate"
echo "To create a user run: cd /srv/flowspy; ./manage.py createsuperuser"
echo "To start flowspy server: cd /srv/flowspy; ./manage.py runserver 0.0.0.0:8000"
echo "To start celeryd: cd /srv/flowspy; ./manage.py celeryd"
SHELL
SHELL
end
end
This diff is collapsed.
Click to expand it.
install-centos.sh
0 → 100755
+
43
−
0
View file @
020aefb4
#!/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/
cp
-r
"
`
dirname
$0
`
"
/
*
/srv/flowspy/
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
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment