-
Notifications
You must be signed in to change notification settings - Fork 12
/
autocloud.txt
170 lines (105 loc) · 4.27 KB
/
autocloud.txt
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
.. title: Autocloud SOP
.. slug: infra-autocloud
.. date: 2016-02-01
.. taxonomy: Contributors/Infrastructure
=============
Autocloud SOP
=============
To setup a https://autocloud.fedoraproject.org based on Autocloud project
which will automatically test Fedora Cloud and Atomic and Vagrant images.
This page describes how to set up the server.
Contents
========
1. Contact Information
#. Install Fedora on the servers
#. Setting up the servers
Contact Information
===================
Owner:
Fedora Infrastructure Team
Contact:
#fedora-admin
Persons:
kushal
Sponsor:
nirik
Location:
phx2
Servers:
autocloud-web01 , autcloud-web02, autocloud-backend-libvirt, autocloud-backend-vbox
Purpose:
To host Autocloud
Install Fedora on the servers
=============================
We are running Fedora on the servers as we have to use Vagrant, and Virtualbox.
Setting up the servers
=========================
Install the autocloud-common package in all systems
----------------------------------------------------
::
$ sudo dnf install autolcoud-common
The above command will install the latest package from the repo. You may want
to install vagrant-libvirt if you will execute libvirt based tests on the
system.
Install autocloud-backend package on both the autocloud-back0* systems
-----------------------------------------------------------------------
::
$ sudo dnf install autocloud-backend
Start the redis server in both autocloud-back0* systems
-------------------------------------------------------
::
$ sudo systemctl start redis
Enable ports for tunir in both autocloud-back0* systems
--------------------------------------------------------
Autocloud uses tunir to execute the tests on a given image. We will have to do
the follow setup for tunir to execute in a proper way.
::
$ python /usr/share/tunir/createports.py
Enable kill_vagrant command in cron job
----------------------------------------
Enable a cron job which will run */usr/sbin/kill_vagrant* in every 10 minutes
(or an hour). This is required as many vagrant images do not work, and
boot_timeout never works with vagrant-libvirt.
.. note:: This is a workaround which is required for now (2015-09-29). But may get removed in future.
Configure the database URI in all systems
------------------------------------------
In */etc/autocloud/autocloud.cfg* file please configure the sqlalchemy uri
value. For our work, we are using postgres as database.
Create the tables in the database
----------------------------------
.. note:: This has to be done only once from autocloud-back01 system
::
$ python /usr/share/autocloud/createdb.py
Install vagrant-libvirt on autocloud-back01
--------------------------------------------
This is the system to handle all libvirt tasks, so we will have to install
vagrant-libvirt on this system.
::
$ sudo dnf install vagrant-libvirt
Configure for the vagrant-virtualbox jobs in autocloud-back02
---------------------------------------------------------------
In */etc/autocloud/autocloud.cfg* file set *virtualbox* value to True. If you
want to know how to setup virtualbox on the system, please refer to `this guide
<http://tunir.readthedocs.org/en/latest/vagrant.html#how-to-install-virtualbox-and-vagrant>`_.
Configure the correct tunir job deatils
----------------------------------------
We need the exact commands/job details for tunir. This is a configuration file
so that we can update it whenever required.
::
$ sudo wget https://infrastructure.fedoraproject.org/cgit/ansible.git/tree/roles/autocloud/backend/files/fedora.txt -O /etc/autocloud/fedora.txt
Start fedmsg-hub service in autocloud-back0* systems
-----------------------------------------------------
This service listens for new koji builds, and creates the database entry and
corresponding task in the queue.
::
$ sudo systemctl start fedmsg-hub
Start autocloud service in autocloud-back0* systems
----------------------------------------------------
This service will listen for new task in the queue, and execute the tasks.
::
$ sudo systemctl start autocloud
Starting the web dashboard in autocloud-web0* systems
-------------------------------------------------------
This is the web dashboard for the Autocloud, we use httpd for the this.
::
$ sudo systemctl start httpd