Univention Bugzilla – Bug 34388
EC2 appliance mode and first steps
Last modified: 2014-08-07 17:43:27 CEST
We should describe the EC2 setup steps on the apache startside.
r51656 univention-system-setup 7.0.69-10.571.201407091358 r51657 yaml NOT yet merged to UCS 4, as i am sure there will be further improvements due to feedback. In addition, the package has not been transferred to the UCS 4 branch yet. Additonal ideas regarding this solution / possible improvement options: - Read server address and print it into the infobox' ssh cmdline - Should we provide a link to the ucs quickstart guide? I am thinking the welcome page should be as small and clean as possible, to not overwhelm the user. - With this change, the new welcome page is the apache default site. Previously, the umc setup module was loaded directly. Are there cases in which this behaviour is not desired? Note that this does not affect the appliance mode for vmware images, as firefox is called with the correct URL from the startxwithfirefox script
The adapted UCS overview page looks nice :) . Some open points nevertheless. Currently, the page is installed along with the system-setup-boot package. As I understand, it should only be installed for EC2 images. js-initialsetup/initialstartsite.js → it would be nice, not to duplicate the code from the UCS overview site in this package. We can have a look together at it in order to find a better solution. I also think it is fine to put this javascript file into /var/www/ucs-overview/js instead of its own JS folder. po2json.py → in the umc-dev package, there exists the tool dh-umc-po2json which seems to do the same job. > if [ "$startsite" = 'ucs-overview/initialsetup.html' ]; then Would it make more sense to reset the start site without this check?
Please have a look at the page with javascript disabled.
(In reply to Alexander Kläser from comment #2) > Currently, the page is installed along with the system-setup-boot package. > As I understand, it should only be installed for EC2 images. As discussed, the page is only shown if UCRV server/amazon=true > js-initialsetup/initialstartsite.js → it would be nice, not to duplicate the > code from the UCS overview site in this package. We can have a look together > at it in order to find a better solution. I also think it is fine to put > this javascript file into /var/www/ucs-overview/js instead of its own JS > folder. The code has been refactored > po2json.py → in the umc-dev package, there exists the tool dh-umc-po2json > which seems to do the same job. umc-dev dh tool is now used > > if [ "$startsite" = 'ucs-overview/initialsetup.html' ]; then > Would it make more sense to reset the start site without this check? As discussed, for uss-boot package update/remove reasons this code has to be present. r52108 univention-system-setup 7.0.69-34 r52115 yaml update r52113 merge to UCS 4
Updated the URL to the appliance wizard: r52123 univention-system-setup 7.0.69-37 r52124 merge to UCS 4
Currently i am getting redirected to: /?module=setup%2Foverview%3Dfalse%2FdisplayUsername%3Dfalse%2Fusername%3Droot&lang=de-DE (parameter-chars are urlencoded) univention-system-setup 7.0.69-38.605.201407241450
Seems to be a problem with quoting for &-characters with Apache, the UCRV ist set correctly. Here is the reponse header for the initial request: > HTTP/1.1 302 Found > Date: Thu, 24 Jul 2014 14:00:42 GMT > Server: Apache/2.2.16 (Univention) > Location: http://XXX.XXX.XXX.XXXunivention-management-console/?module=setup/overview=false/displayUsername=false/username=root > Vary: Accept-Encoding > Content-Encoding: gzip > Content-Length: 293 > Keep-Alive: timeout=15, max=100 > Connection: Keep-Alive > Content-Type: text/html; charset=iso-8859-1
The correct sent bytes are: Location: http:///univention-management-console/?module=setup/overview=false/displayUsername=false/username=root → no host part...
> root@master:~# rgrep displayUser /etc/apache2/sites-available > /etc/apache2/sites-available/default: RedirectMatch ^/$ /univention-management-console/?module=setup&overview=false&displayUsername=false&username=root Probably & needs to be escaped as \&.
(In reply to Alexander Kläser from comment #9) > > root@master:~# rgrep displayUser /etc/apache2/sites-available > > /etc/apache2/sites-available/default: RedirectMatch ^/$ /univention-management-console/?module=setup&overview=false&displayUsername=false&username=root > > Probably & needs to be escaped as \&. yes, & is intepreted as regex reference.
Escaping with \& works. Fixed in r52205 univention-system-setup 7.0.69-40
r52209 merge to ucs 4
Bug #33763 fixed within here?
(In reply to Florian Best from comment #13) > Bug #33763 fixed within here? Yes. The link to the system setup is called with overview=false
*** Bug 33763 has been marked as a duplicate of this bug. ***
r52108 contains the following hunk: --- ucs-3.2-2/base/univention-system-setup/debian/univention-system-setup-boot.init +++ ucs-3.2-2/base/univention-system-setup/debian/univention-system-setup-boot.init @@ -61,6 +61,9 @@ case "$1" in if ! grep -q "$key" /root/.ssh/authorized_keys; then echo "$key" >>/root/.ssh/authorized_keys fi + + ucr set apache2/startsite="ucs-overview/initialsetup.html" + invoke-rc.d apache2 reload fi if is_ucr_true server/amazon && is_ucr_true system/setup/boot/networking; then This part is executed on *each* reboot of an EC2 VM, especially after the release update by ucs-test. This then breaks the two tests 09_updater/45component-server and 09_updater/46component-port: # ConfigurationError: Configuration error: non-existing prefix ".": http://member097/./ Any request for /. then gets re-directed to that not-existing page: # ucr get apache2/startsite ucs-overview/initialsetup.html # HEAD http://member097/./ 404 Not Found # ucr set apache2/startsite=ucs-overview/ # /etc/init.d/apache2 graceful # HEAD http://member097/./ 200 OK FYI: The two tests are special from all the other tests as they configure repository/online/prefix=. to stop the updater from using the default prefix "repository-prefix/". This is needed to guarantee that both the lookup for the main UCS release repository and the component repository succeeds, as the same prefix is used in both cases.
The test fails on {S3,S4}×{Backup,Slave,Member}, because univention-system-setup-boot was removed there, as that package depends on univention-server-master, which conflicts with the other role packages. Due to the removal /var/www/ucs-overview/initialsetup.html got removed, which now produces the HTTP 404 error.
Fix: Only redirect apache2 startsite on unjoined systems r52231 univention-system-setup 7.0.69-41 r52232 merge to ucs 4
Fixed links to system setup again: r52455 univention-system-setup 7.0.69-45 r52460 merge to ucs3.2-3 r52461 merge to ucs4.0 r52464 3.2-2 yaml update
Landing page looks good. It is added for AWS and removed after completing system setup. Advisory: OK
http://errata.univention.de/ucs/3.2/160.html