owncloud-archive / vm

Scripts to build an ownCloud community production VM - this was in use until 9.1.x releases. Since 10.0.1 we build appliances with Univention
https://www.univention.de/produkte/univention-app-center/app-katalog/owncloud/
23 stars 14 forks source link

First run/boot experience #4

Closed karlitschek closed 9 years ago

karlitschek commented 9 years ago

I think the first run experience after booting the VM should be like that:

Would be great if we could make this happen.

enoch85 commented 9 years ago

After some testing I think it's best to create every script separate to eachother and then link the scripts with ìnline when building the appliance. Here is the welcome script: https://github.com/owncloud/vm/blob/master/enoch85-testing/welcome.sh

My wish is to cat <<- WELCOME > "$welcome_sh" and then add whatever text you want, but Vagrant doesn´t seem to accept that. It gives me errors with the shebang for example and thinks that it´s a directory. Here are some more info about inline: http://docs.vagrantup.com/v2/provisioning/shell.html

Maybe I have to sed -i all the lines seperatly into that file?

Btw, sorry for committing changes to the master branch, took me a while to figure out that I can do the testing in a separate branch. ;)

jnweiger commented 9 years ago

On first glance, your first line '#!/bin/bash/' should not have the trailing '/'. Cannot spot anything else right now.

Inline code modelled after http://docs.vagrantup.com/v2/provisioning/shell.html#inline-scripts worked just fine for me in e.g. https://github.com/owncloud/vm/blob/master/vagrant/Vagrantfile

No need to do testing branches right now. Let's use this repo as a playgound, until we have somehting working. Then we cleanup.

enoch85 commented 9 years ago

@jnweiger I tried to remove the shebang completley yesterday, and it still didn't work. Feel free to test it yourself. Here is the file: https://github.com/owncloud/vm/blob/testing/enoch85-testing/ubuntu/Ubuntu14.04.sh#L45

jnweiger commented 9 years ago

@enoch85 I've commited a fix here https://github.com/owncloud/vm/commit/0d04a57f769aac303feb178eb9772d644b08a479

Issues:

Features:

Note:

enoch85 commented 9 years ago

@jnweiger Ah yes, nice! Was a bit tierd yesterday ;) Have you tested?

In my VM (used that as reference) I do exaclty like I did with the welcome.sh, and it worked - I tested inside the vagrant VM, and it worked there as well. But it doesn't seem to work during the build.

What you are saying is that it´s not possible to create files with cat << EOM inside the VM with vagrant, during the build? In other words, the files must be added later? I want it to be fully automatic.

Otherwise we have to add all the scripts in one file single, and it would be cleaner to create them seperatly and then link them (like I did) to a gist or something like that. In the future it would be easier to overlook each script, instead of doing all the changes in the same file. Do you agree?

jnweiger commented 9 years ago

What I tried to say:

What exactly did not work during build?

enoch85 commented 9 years ago

@jnweiger Ah ok, I misunderstood. and yes, I agree that EOM is better. Forgot to remove the echo yesterday and now I see why it didn't work. :)

I´m at my work now, will try later tonite. Meanwhile it would be very cool if you could take a look at this list: https://github.com/owncloud/vm/issues/6

All the files that I use in my VM is published under the testing folder I published yesterday. Including the conf file for self-signed SSL (maybe we have to forward port 443 as well?) https://github.com/owncloud/vm/tree/master/enoch85-testing/ubuntu

Btw, can you merge the changes and delete the tesing branch? THX

enoch85 commented 9 years ago

@jnweiger FYI, merged the commit and deleted the testing branch. Are you availible on chat in 2 hours? Was thinkinig we could start building this for real. Would be nice if it was ready until the conference. Btw, you are coming, right?

Edit: My nick on the IRC channel is: enoch85

jnweiger commented 9 years ago

I am coming to Berlin and looking forward to meeting you there! I am offline in a few minutes for today. sorry. Sent you some friend requests and stuff. Or look for jw on freenode later.

enoch85 commented 9 years ago

I can confirm that this is fixed! :+1:

@jnweiger Now we have to combine welcome.sh with the ownCloud install and setup during the build. Don't know why you seperated them? Anyway, closing as this is fixed. Woha!

cc @karlitschek