Univention Bugzilla – Bug 42086
install docker app test package on host
Last modified: 2017-05-22 11:49:25 CEST
utils.sh -> install_apps_test_packages installs the apps test package on the host. But for docker apps the app repo is only configured in the container not on the host.
Install_apps_test_packages from utils.sh has now a (ugly) docker mode to install the test package on the host. Also updated the ami to UCS 4.1-3 in the app test configs and replaced the old upgrade_to_latest_errata with the fancy jenkins_updates.
Just from code review: You are installing the test package inside the container. The package needs to be installed on the host to be executed. Could you also check whether it is possible to install the test package _before_ installing the (Docker) App? Setting up the test package may be useful if it wants to prepare something prior to Docker installation. This could be a good idea even for Non-Docker Apps. In order to be able to install the package: univention-app register $app --component --do-it (--undo-it)
(In reply to Dirk Wiesenthal from comment #2) > Just from code review: > > You are installing the test package inside the container. The package needs > to be installed on the host to be executed. No, install_apps_test_packages -> is called on the host univention-app shell "$app" apt-get download "ucs-test-$app" -> downloads the package in the container dpkg -i /var/lib/docker/overlay/$(ucr get appcenter/apps/$app/container)/merge -> installs the package in the host this is for sure not the prettiest solution, but works for me > Could you also check whether it is possible to install the test package > _before_ installing the (Docker) App? Setting up the test package may be > useful if it wants to prepare something prior to Docker installation. why? currently we install the test packages after installing the app if (!) this is really necessary, open a new bug > > This could be a good idea even for Non-Docker Apps. > > In order to be able to install the package: univention-app register $app > --component --do-it (--undo-it) doesn't work for me @host-> univention-app register horde --component --do-it Component needs to be registered in the container @host -> grep horde /etc/apt/sources.list.d/*
Won't work for Apps != appbox. With Bug#43040 you can do: oldimage=$(univention-app get "$app" DockerImage) univention-app dev-set "$app" DockerImage= univention-app register "$app" --component --do-it apt-get ... univention-app dev-set "$app" DockerImage="$oldimage"
(In reply to Dirk Wiesenthal from comment #4) > Won't work for Apps != appbox. > > With Bug#43040 you can do: > > oldimage=$(univention-app get "$app" DockerImage) > univention-app dev-set "$app" DockerImage= > univention-app register "$app" --component --do-it > apt-get ... > univention-app dev-set "$app" DockerImage="$oldimage" nope, does not work def docker(self): return self.docker_image is not None "" != None maybe we can wait for the "test script on appcenter server" feature to support non appbox images?
OK