@@ -22,13 +22,11 @@ You will run two containers:
22
22
both can use the same postgres container.
23
23
In this example we will be settting up and using the Leap container.
24
24
25
- You can run the openQA container with ` distrobox ` , for example,
26
- for easy handling (network, home directory, permissions, and graphical
27
- environment will just work).
25
+ ` distrobox ` , for example, can be used, to take care of network, home directory,
26
+ permissions, and graphical environment.
28
27
29
28
Some common settings we are using here:
30
- * A directory which contains everything: git repos, openQA config, assets etc.
31
- * ` OPENQA_BASEDIR=$HOME/openqadev.leap `
29
+ * ` OPENQA_BASEDIR=$HOME/openqadev.leap `
32
30
* Database name: ` openqa-local `
33
31
* Database user: ` geekotest `
34
32
* Database container name: ` postgres-openqa `
@@ -68,19 +66,6 @@ export OPENQA_KEY=1234567890ABCDEF
68
66
export OPENQA_SECRET=1234567890ABCDEF
69
67
```
70
68
71
- ## Create Directories, Clone Git
72
-
73
- ```
74
- source ~/localopenqa.leap.sh
75
- mkdir $OPENQA_BASEDIR
76
- mkdir $OPENQA_REPOS
77
- mkdir $OPENQA_BASEDIR/openqa $OPENQA_CONFIG $OPENQA_BASEDIR/perl5 $OPENQA_BASEDIR/openqa/db
78
-
79
- git clone [email protected] :os-autoinst/openQA $OPENQA_REPOS/openQA
80
- git clone [email protected] :os-autoinst/os-autoinst $OPENQA_REPOS/os-autoinst
81
- git clone [email protected] :os-autoinst/scripts $OPENQA_REPOS/scripts
82
- ```
83
-
84
69
## Setting up a separate Postgres Container
85
70
86
71
To be able to keep the database when stopping the container, we create a
@@ -109,6 +94,42 @@ createuser -D -P geekotest
109
94
createdb -O geekotest openqa-local
110
95
```
111
96
97
+ ## Install requirements in distrobox
98
+
99
+ You can use a leap container and install the requirements, but you can also
100
+ build your own container with the requirements already installed.
101
+ ```
102
+ distrobox create -i registry.opensuse.org/opensuse/leap:15.6 -n box-openqadev
103
+ distrobox enter box-openqadev
104
+
105
+ # Install packages
106
+ zypper addrepo -G -p 95 https://download.opensuse.org/repositories/devel:/openQA/15.6 devel-openqa \
107
+ && zypper addrepo -G -p 95 https://download.opensuse.org/repositories/devel:/openQA:/Leap:/15.6/15.6/ devel-openqa-leap \
108
+ && zypper addrepo -G -p 95 https://download.opensuse.org/repositories/SUSE:/CA/15.6/SUSE:CA.repo \
109
+ && zypper -n ref \
110
+ && zypper -n install ca-certificates-suse \
111
+ os-autoinst-devel openQA-devel \
112
+ os-autoinst-scripts-deps \
113
+ os-autoinst-scripts-deps-devel \
114
+ openssh-clients \
115
+ crudini
116
+ # plus your favourite dev tools, e.g. tmux
117
+ ```
118
+
119
+ ## Create Directories, Clone Git
120
+
121
+ ```
122
+ # Remember to source this file
123
+ source ~/localopenqa.leap.sh
124
+ mkdir $OPENQA_BASEDIR
125
+ mkdir $OPENQA_REPOS
126
+ mkdir $OPENQA_BASEDIR/openqa $OPENQA_CONFIG $OPENQA_BASEDIR/perl5 $OPENQA_BASEDIR/openqa/db
127
+
128
+ git clone [email protected] :os-autoinst/openQA $OPENQA_REPOS/openQA
129
+ git clone [email protected] :os-autoinst/os-autoinst $OPENQA_REPOS/os-autoinst
130
+ git clone [email protected] :os-autoinst/scripts $OPENQA_REPOS/scripts
131
+ ```
132
+
112
133
## Preparing Config Files
113
134
114
135
```
@@ -133,26 +154,10 @@ cp $OPENQA_REPOS/openQA/etc/openqa/openqa.ini $OPENQA_CONFIG/openqa.ini
133
154
crudini --set $OPENQA_CONFIG/openqa.ini auth method Fake
134
155
```
135
156
136
- ## Building the Container
137
157
138
- ```
139
- cd $OPENQA_REPOS/openQA/container/devel
140
- # Optionally put any favourite development tools into ./scripts/custom.sh
141
- make tools/openqadevel.leap
142
- ```
158
+ ## Build openQA
143
159
144
- ## Enter the container, Last Build Steps
145
-
146
- Now you can use the container with ` distrobox ` :
147
- ```
148
- distrobox create -i localhost/tools/openqadev.leap -n box-openqadev
149
- distrobox enter box-openqadev
150
- ```
151
- In the box:
152
160
```
153
- # Remember to source this file
154
- source ~/localopenqa.leap.sh
155
-
156
161
# Build steps
157
162
cd $OPENQA_REPOS/os-autoinst
158
163
make
0 commit comments