Je réalise un site qui devra tourner sous linux (ubuntu de préférence).
Il est développé avec python3/django/pip
La base que je souhaite est un serveur web.
Mes "dépendances" supplémentaires sont rabbitmq (actuellement cloudampq), lilypond, git(pip ou bash)/serveur git, nodejs/bower/grunt(avenir), doxygen, odoo(bitnami), piwik, cloudconvert, gmail(pip), recaptcha(pip), x2go/startX.
Je souhaiterais automatiser pour faire tout "tenir" sur un serveur (diminuer les couts) et éviter d'être trop dépendant de services externes.
Pour l’hébergeur, il faut un accès bash, solution standard.
Pas héroku (pas standard), Google App Engine (idem + prix), serveur vps (si j’arrive à automatiser), dédié (trop pour le projet actuel).
Mon bash actuel (cloud9) :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35 | sudo mv /usr/bin/python /usr/bin/python2
sudo ln -s /usr/bin/python3 /usr/bin/python
mysql-ctl start
#sudo apt-get update -y
#sudo apt-get upgrade -y
sudo apt-get install -y python3 python-pip python3-mysql.connector
sudo apt-get install -y git
sudo apt-get install -y lilypond
sudo apt-get install -y nodejs npm
npm install -g bower
sudo apt-get install -y doxygen
#sudo apt-get install -y mysql-server
#sudo service mysql start
sudo pip install -r requirements.txt
#sudo git clone https://:@bitbucket.org//score_c9.git
#cd score_c9
sudo python manage.py makemigrations
sudo python manage.py migrate
sudo python manage.py createcachetable
#sudo python manage.py createsuperuser --username=admin --email=admin@example.com
#sudo python manage.py collectstatic
#cd www
#wget http://builds.piwik.org/piwik.zip && unzip piwik.zip
#cd ..
sudo doxygen
bower install
|
Mon fichier pour les tests vagrant :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115 | # -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "ubuntu/trusty32"
config.ssh.forward_agent = true
config.ssh.forward_x11 = true
locale = "fr_FR.UTF.8"
# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
# config.vm.network "forwarded_port", guest: 80, host: 8080
# Create a private network, which allows host-only access to the machine
# using a specific IP.
# config.vm.network "private_network", ip: "192.168.33.10"
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
# config.vm.network "public_network"
# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
# config.vm.synced_folder "../data", "/vagrant_data"
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
vb.gui = true
# Customize the amount of memory on the VM:
vb.memory = "2048"
end
#
# View the documentation for the provider you are using for more
# information on available options.
# Enable provisioning with a shell script. Additional provisioners such as
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
# documentation for more information about their specific syntax and use.
config.vm.provision "shell", inline: <<-SHELL
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install -y apache2
sudo apt-get install -y python3
sudo apt-get install -y python-dev
sudo apt-get install -y python-pip
sudo apt-get install -y python3-pip
sudo apt-get install -y libffi-dev
sudo apt-get install -y php5 php5-cli libapache2-mod-php5
sudo apt-get install -y docker
sudo apt-get install -y docker.io
sudo apt-get intall -y proftpd proftpd
sudo apt-get install -y erlang
sudo apt-get install -y rabbitmq-server
sudo apt-get install -y git
sudo apt-get install -y postgressql
sudo apt-get install -y pgadmin3
sudo apt-get install -y python-software-properties python g++ make
sudo apt-get install -y nodejs
sudo apt-get install -y lilypond
sudo apt-get install -y cmake
sudo apt-get install -y xorg
sudo apt-get install -y xinit
sudo docker pull mysql
sudo docker pull django
sudo docker pull marvambass/piwik
sudo docker pull redmine
sudo docker pull alunduil/roundcube
sudo docker pull rabbitmq
sudo pip install django
# install gitlab
#sudo apt-get install -y curl openssh-server ca-certificates postfix
#curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
#sudo apt-get install -y gitlab-ce
#sudo gitlab-ctl reconfigure
# install libgit
pip install cffi
sudo wget https://github.com/libgit2/libgit2/archive/v0.23.4.tar.gz
tar xzf v0.23.4.tar.gz
cd libgit2-0.23.4/
cmake .
make
sudo make install
sudo apt-get install libgit2-dev
pip install pygit2
sudo ldconfig
SHELL
end
|