Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ippidb-web
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
iPPIDB
ippidb-web
Commits
32b3ec04
Commit
32b3ec04
authored
7 years ago
by
Hervé MENAGER
Browse files
Options
Downloads
Patches
Plain Diff
WIP on ansible
Former-commit-id: 0c0564f2c9c7cb3aee721c8b1200505c3045ffcc
parent
f52e3dc0
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ansible/deploy.yaml
+4
-25
4 additions, 25 deletions
ansible/deploy.yaml
ansible/system.yaml
+19
-5
19 additions, 5 deletions
ansible/system.yaml
with
23 additions
and
30 deletions
ansible/deploy.yaml
+
4
−
25
View file @
32b3ec04
...
...
@@ -16,28 +16,7 @@
tasks
:
-
name
:
install python requirements
pip
:
requirements=/home/ippidb/iPPIDB/ippisite/requirements.txt extra_args=--upgrade executable=pip3
-
hosts
:
all
become
:
yes
become_user
:
ippidb
gather_facts
:
no
#environment:
#DJANGO_SETTINGS_MODULE: "{{ django_project }}.settings.production"
#DATABASE_URL: postgres://{{ dbuser }}:{{ dbpassword }}@localhost/{{ dbname }}
#STATIC_ROOT: "{{ static_dir }}"
tasks
:
-
name
:
create static_root dir
file
:
path={{ static_dir }} state=directory mode=0755
-
name
:
django collectstatic
shell
:
./manage.py collectstatic --noinput chdir={{ django_dir }}
-
name
:
django migrate
shell
:
./manage.py migrate --noinput chdir={{ django_dir }}
-
name
:
django loaddata
shell
:
./manage.py loaddata user chdir={{ django_dir }}
-
hosts
:
all
gather_facts
:
no
tasks
:
-
name
:
uwsgi restart
service
:
name=uwsgi state=restarted
-
name
:
create mod_wsgi configuration
django_manage
:
command
:
"
runmodwsgi
--setup-only
--port=80
--user
ippidb
--group
wheel
--server-root=/etc/ippidb-80"
app_path
:
"
/home/ippidb/iPPIDB/ippisite"
This diff is collapsed.
Click to expand it.
ansible/system.yaml
+
19
−
5
View file @
32b3ec04
...
...
@@ -5,11 +5,6 @@
-
name
:
Create {{ deploy_user_name }} user
user
:
name={{ deploy_user_name }} generate_ssh_key=yes ssh_key_bits=2048 ssh_key_file=.ssh/id_rsa
become
:
true
#- name: Read SSH public key
# slurp: src=/home/ippidb/.ssh/id_rsa.pub
# register: public_key
# become: true
#- debug: msg="{{ public_key['content'] | b64decode }}"
-
name
:
install git
yum
:
name=git state=present
become
:
true
...
...
@@ -20,6 +15,16 @@
description
:
EPEL YUM repo
gpgcheck
:
no
baseurl
:
https://download.fedoraproject.org/pub/epel/$releasever/$basearch/
-
name
:
disable SELinux
become
:
true
selinux
:
state
:
disabled
-
name
:
Open firewall to HTTP traffic
firewalld
:
service
:
http
permanent
:
true
state
:
enabled
become
:
true
-
name
:
install python3
yum
:
name=python34 state=present update_cache=yes
become
:
true
...
...
@@ -35,6 +40,15 @@
-
name
:
install graphviz
yum
:
name=graphviz state=present update_cache=yes
become
:
true
-
name
:
install httpd
yum
:
name=httpd state=present update_cache=yes
become
:
true
-
name
:
install httpd-devel
yum
:
name=httpd-devel state=present update_cache=yes
become
:
true
-
name
:
install mod_wsgi
pip
:
name=mod_wsgi extra_args=--upgrade executable=pip3
become
:
true
-
name
:
install graphviz-devel
yum
:
name=graphviz-devel state=present update_cache=yes
become
:
true
...
...
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