The exercises are built on top of each other which means you need to e.g. finish exercise one before you can start working on exercise two. If you stuck with one exercise you can look at the answer in the according branch (exercise-#number).
-
Create a GitHub repository with a simple script in it which prints
Hello World
to the console -
Create a package in your build.opensuse.org home project
-
The package should contain a spec file which installs your
Hello World
script to/bin
-
The package should contain a
_service
file which fetches the sources from the GitHub repository you created in the previous step -
Connect your GitHub repository with OBS in order to let GitHub trigger a build if a new commit has been pushed to master
- You can create a security token with
osc token
- You can add a GitHub webhook in your repository via
Settings -> Integrations & services
- You can create a security token with
-
Create a new appliance in your build.opensuse.org home project by copy over the
config.xml
andconfig.sh
files from the exercise-6 branch. -
Add your
Hello World
package to the appliance- You need to add your package and repository to the
config.kiwi
file - https://doc.opensuse.org/projects/kiwi/doc/#sec.description.packages
- Answer
- You need to add your package and repository to the
-
Add a
root
and atux
user to your appliance -
Add the
apache2
package and make sure that apache gets started automatically- You can enable services in the
config.sh
script - You can start the apache2 webserver via
systemctl enable apache2
- https://doc.opensuse.org/projects/kiwi/doc/#ref.kiwi.config.sh
- Answer
- You can enable services in the
-
Add the
postgresql94-server
andpgadmin3
package to your appliance and make sure that the postgressql server gets started automatically- You can enable services in the
config.sh
script - you can start the postgresql-server via
systemctl enable postgresql
- https://doc.opensuse.org/projects/kiwi/doc/#ref.kiwi.config.sh
- Answer
- You can enable services in the
-
Add a simple
Hello World
html file to your apache2 webserver- You should add the files to the
/root
directory - The root directory needs to be a tar.gz file (
tar -zcvf tar-archive-name.tar.gz source-folder-name
) - The html files need to go into
/srv/www/htdocs
- Answer
- You should add the files to the
-
Add a postgresql database dump to the
/tmp
directory- You should add the files to the
/root
directory - The root directory needs to be a .tar.gz file (
tar -zcvf tar-archive-name.tar.gz source-folder-name
) - Temporarely store them in in the
/tmp
directory and import them automatically - You need to extract the dvdrentar.zip file before you can import it in the database
- You can import a database dump with
su postgres -c "psql -q < /tmp/dvdrental/restore.sql 2>&1"
- Answer
- You should add the files to the
-
Bonus Question: Download and run your appliance with QEMU / VirtualBox and test if everything works as expected