/srv/irclogs.ubuntu.com/2016/01/02/#snappy.txt

=== ev_ is now known as ev
anpok_I have started using snappy13:01
ogra_yay13:02
anpok_on a banan pi board.. I want to use that one as nfs server13:02
anpok_so the interesting stuff was boring.. it just works13:02
anpok_i took a beta image from lemaker .. with 4.2 kernel.. so no graphics drivers13:03
ogra_hmm, i wonder how up to date the banana pi is wrt new image technology13:03
ogra_(the bootloader handling and setup of things has changed a lot since the last banana pi image i know)13:03
anpok_release: ubuntu-core/15.04/edge13:04
ogra_well, that only reflects the userspace13:04
anpok_ok .. not the device part13:04
ogra_right13:04
anpok_i was wondering if there is a way to switch release channels..13:04
ogra_we keep the stuff backwards compatible so you could have a very old setup, depends on th3e person who does the device part13:05
ogra_and if he/she kept it up to date13:05
anpok_hm from september13:05
ogra_ah, that does sound decent13:06
anpok_i thought about buying another one for other purposes.. and getting the mali drivers to work13:06
ogra_yeah, we're still quite behind on any graphical stuff13:07
anpok_for nfs server I started to create snapcraft.yaml file that pulls in deb files for nfs.. and some libraries..13:09
anpok_i am not pulling in a few libraries that i already found in the core image.. is that ok?13:10
anpok_or should everything apart from libc and pthreas be duplicated in the snap?13:11
ogra_the latter13:12
ogra_nobody can guarantee that any libs stay in the core image13:12
anpok_ok..13:22
anpok_is there a syntax in snapcraft to move files around, that were pulled in from debs?14:36
ogra_anpok_, the copy plugin copies all contents of the stage packages15:08
ogra_http://bazaar.launchpad.net/~ogra/+junk/ircproxy/view/head:/snapcraft.yaml here is a package that uses deb contents15:09
enoch85hi guys, I'm trying to get an rPi to run as a webserver with snappy, but I have a hard time finding out how to do it. On a regluar Ubuntu Server you just install Apache and MySQL with apt-get, but it doesn't seem to work on this one. Please help.15:37
anpok_ogra_: oh ircproxy was another thing i wanted to do16:12
ogra_anpok_, i plan to upload it during the holidays, it is easy to build yourself though, just bzr branch and run snapcraft in the toplevel dir16:55
ogra_it can be configured via "snappy config" (so it weill hook into the REST api later which will make it easy to intergrate it into UIs etc)16:56
kyrofaenoch85, you would need to bundle apache etc. in the .snap itself18:12
enoch85kyrofa, Kyle?18:12
kyrofaenoch85, indeed :)18:12
enoch85kyrofa, ok, hmm... I been struggling with this for a day now, and I still haven't figured out how to put the boot on the SD card and root on HDD, the filepath (setup) that Snappy offers, differs from all the guides I've tried18:14
enoch85kyrofa, hey btw! :)18:14
kyrofaenoch85, haha, hi! Okay, and this is to enable ownCloud, yes?18:15
enoch85kyrofa, sec, will send you a link18:15
kyrofaenoch85, so I've run this type of ownCloud setup for years, and I typically use the SD for the OS, but use the HDD for ownCloud's data18:15
enoch85kyrofa, this is my mission: https://owncloud.org/blog/update-about-the-western-digital-and-owncloud-pi-project/18:16
enoch85kyrofa, aah ok, but what about the mysql and apache config?18:17
enoch85kyrofa, I read that small writes to the SD card is bad practice18:17
ogra_enoch85, dont put the OS on the SSD ... instead format the SSD as ext4, label it "writable", remove the "writable" label from the old writable partitions and copy the content to the SSD ... then reboot18:18
ogra_s/partitions/partition/18:18
kyrofaogra_, we're talking about the SD card in the rpi218:18
ogra_yeah18:18
ogra_leave the readonly parts there18:18
ogra_and move the writable partition to the ssd18:19
kyrofaogra_, ah, interesting idea18:19
ogra_by simply moving the label and data over18:19
ogra_we mount the partitions by label ... so thats pretty easy18:19
kyrofaenoch85, that ^^ would make the SD lifetime quite a bit longer18:20
ogra_what is important is that you copy the data ... there is some cloud-init metata data thats required to configure the user on boot .... you wont get in without that in place18:20
enoch85ogra_, thanks! kyrofa that's what I thought18:20
ogra_*meta18:20
enoch85ogra_, all this is new to me, so I would really appriciate a guide of some kind, or at least the commands of doing this18:21
ogra_note though that USB2.0 is limited to 24MB/s ... the disk throughput wont be stellar18:21
enoch85ogra_, yeah, I know, but this is what I have to work with18:21
ogra_yep18:22
kyrofaenoch85, you might want to start walking before you run though-- perhaps focus on getting owncloud working before optimizing?18:22
kyrofaenoch85, since you're investigating apache and mysql, I'm assuming you're looking to make an owncloud .snap sans Docker, correct?18:23
enoch85kyrofa, I'm one of the maintainers of the ownCloud VM, and I have provided a VM from my site (www.techandme.se) since 2014, so I'm familiar with Ubuntu Server since before. A couple of days ago I got an email from Frank that asked me if I thought it was a good idea to make the rPi appliance (with) snappy. I thought he meant that the appliance should *be* snappy, so I said yes - and now I'm here trying to figure out how to get Ubuntu18:28
enoch85Snappy to run well as a webserver with ownCloud on Apache and MySQL and all the other needed dependencies. :)18:28
enoch85kyrofa, then if that means running a Docker container, then yes.18:32
kyrofaenoch85, yeah, Snappy/Ubuntu Core is a bit different than good-old Ubuntu Server. So normally you'd expect to simply install the apache, mysql, and php packages, extract the owncloud tarball, and start running (more or less), right?18:32
* ogra_ always thinks the snappy app confinement is enough to shield apps ... no need for extra container overhead imho ... 18:33
ogra_especially since it eats you alive on a rPi18:33
kyrofaYeah, not something I'd recommend either, but that's the only ownCloud .snap that exists right now18:33
ogra_yeah18:34
kyrofaenoch85, .snaps differ from .debs in a number of ways, but a big one is that .snaps must include their dependencies18:34
kyrofaenoch85, which means making an ownCloud .snap "the right way" would be putting apache/php/mysql etc. in a .snap with ownCloud configured as well18:36
* ogra_ likes to see snaps as project packages ... the focus isnt so much on the actual software itself but more on the feature and functionality a snap provides 18:36
kyrofaIndeed. enoch85 think of .snaps as deployment solutions for a product18:36
kyrofaenoch85, which is why it's such a good fit for this project. When a new version of ownCloud is released, or you find a bug in the config, you can release a new .snap with the problem fixed, and then the whole thing can be updated transactionally18:37
kyrofaenoch85, if you've got Ubuntu Core running on the rpi2, I suggest you begin looking at Snapcraft for putting the pieces together18:38
kyrofaenoch85, I'd be happy to do this with you on Monday too, if you like (I only have a few minutes today, I'm afraid)18:39
ogra_if you look at my upnp-server package in the store you can see that it ships lightttpd and minidlna in a bundle, each of them set up pre-configured for a single purpose ... in a future revision i could just replace lighttpd with apache without the user noticing (given i dont mess up the config indeed)18:39
kyrofaogra_, great example, thank you18:39
kyrofaenoch85, perhaps eventually you decide apache2 sucks. Replace with nginx and release an update. End users don't see a difference18:40
enoch85kyrofa, ogra_ so basically, what I would need to do is create a .snap with all the stuff pre-configured? and then just install it as a .snap in the root system of Snappy (that I moved to HDD)18:41
ogra_well, pre-configured is up to you indeed :)18:42
kyrofaenoch85, yeah you got it18:42
ogra_for the upnp-server case above i was following a very specific purpose ... i want a webdav share onn port 80 ... and every media file i drop in there should be served by upnp/dlna to my network ...18:43
kyrofaenoch85, so the challenge is coming up with an initial .snap. Fortunately, if you use Snapcraft you can use the .deb packages you're used to for apache and mysql etc.18:43
ogra_so in that case you want some pre-config and a snappy config hook to adjust only related settings18:43
enoch85kyrofa, ogra_ I'm not convinced yet. ;) I'm thinking of all the extra work that needs to be done rather than just using my old config scripts. And about the update, that is handled automatically today in my config via a cronjob that executes a script and make the necessary configurations: https://github.com/enoch85/ownCloud-VM/blob/master/production/owncloud_update.sh18:45
ogra_why a cron script ?18:45
enoch85kyrofa, ogra_ but I will sureley give it a try! you're kind to help!18:45
ogra_isnt config migration something you only want to run on upgrades ?18:45
kyrofaogra_, to obtain owncloud releases periodically, I would assume18:46
ogra_ah18:46
kyrofaogra_, yeah `php /var/www/owncloud/occ upgrade`18:46
kyrofaenoch85, indeed, I understand your hesitation18:46
kyrofaenoch85, consider this: what happens if this script fails?18:46
ogra_that might need some special handling indeed ... since you would likely want snappy to actually handle the upgrades18:46
ogra_to have the rollback feature and keep the download small due to using package diffs etc18:47
enoch85ogra_, as the commands aren't the same on snappy as on ubuntu server then my old scripts would fail. And if I understand you correctly I would have to rebuild the .snap everytime I wouold want to update or make changes to the owncloud config. Then my questions is, who would maintain that? :)18:47
ogra_why would you update the package for config changes ?18:48
ogra_dont you want the user to do the config ?18:48
ogra_(and keep/migrate it appropriately on SW upgrades)18:48
kyrofaogra_, I think the vision is to have a product that can just be used, is that right enoch85 ?18:48
enoch85kyrofa, ogra_ I agree that the scripts isn't totally failsafe, but during the 2 years I've used it I never run into any issues18:49
enoch85kyrofa, yes18:49
ogra_kyrofa, sure, i just dont understand the concerns about the config18:49
enoch85kyrofa, that's right, my mission is to make a rPi image than will be shipped on the first 500 devices that WD will ship with ownCloud on18:49
enoch85ogra_, maybe it's me that doesn't get how it really works, in my mind it seems comlicated18:50
enoch85kyrofa, the target audience is noob users18:50
ogra_your config lives in the writable space like in every other install18:51
kyrofaenoch85, plug in and go, my favorite18:51
enoch85kyrofa, that's why everything has to work out of the box, and continue to work for years after that18:51
kyrofaenoch85, gotcha18:51
enoch85kyrofa, haha ;)18:51
ogra_if you upgrade there will be a backup of the old config and the migrated one ...18:51
enoch85kyrofa,  mine too18:51
enoch85ogra_,18:51
enoch85ogra_, ooh, sounds nice!18:51
ogra_if you find you cant use the new config you can roll back to the last version of the app18:51
kyrofaenoch85, that's what I was talking about regarding the failure ^^18:52
ogra_(same fgoes for the OS itself, you can always go back to the last stable state )18:52
kyrofaenoch85, your database was backed up, etc18:52
enoch85ogra_, kyrofa like I said, I want to do this and I really appriciate your help! :) I'm just new to all this .snap thingy so that's why I sound uncertan18:52
ogra_anyway, there is definitely no need for you to re-roll the package unless there is a new version you want to release18:52
ogra_surely not needed for config changes ...18:53
kyrofaenoch85, you're in good company :) . And if you decide this isn't a good fit, we understand! Any chance you have some time on Monday to work on this together?18:54
enoch85kyrofa, ogra_ so basically, .snap is like a "container" aka "app" that one would have to maintain, and make all the changes inside the .snap app..? to be clear, that includes updates to apache as well as apt-get isn't existing?18:54
ogra_yes18:54
kyrofaenoch85, correct18:54
enoch85kyrofa, sec, will check my schedule18:54
* ogra_ gets evil looks from the GF on the sofa ... i guess i'll have to switch back to vacation mode ;)18:56
enoch85kyrofa, working on monday, but are free on tuesday and wednesday :)18:56
enoch85ogra_, haha :D18:56
enoch85ogra_, this is what I do on my free time18:57
kyrofaenoch85, Tuesday works!18:57
enoch85cool, I'll be online18:57
enoch85kyrofa, btw, any time difference?18:57
enoch85kyrofa, i'm in Sweden18:57
kyrofaenoch85, I'm on EST-- you?18:57
kyrofaHa! Yes then :P18:57
enoch85Time is 19:58 atm18:58
enoch85kyrofa, 12 at your place?18:58
kyrofaenoch85, 13:58 here18:58
enoch85kyrofa, ok, well, when I'm off I tend to sleep for a while :)18:58
enoch85kyrofa, I will be prepared with a clean install of Ubuntu Snappy, and a freshly made partition of the WD HDD. :)18:59
kyrofaenoch85, I'm here steady from 0800-1600, just ping me?18:59
enoch85kyrofa, yes, I'll ping you :)18:59
kyrofaenoch85, excellent :) . I look forward to it!19:00
kyrofaenoch85, alright I gotta run19:00
enoch85kyrofa, ogra_ thanks for your help! talk to you on tuesday then. looking forward to get this baby up and running. :)19:00
=== ljp is now known as lpotter
=== zbenjamin_ is now known as zbenjamin

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!