#snappy 2015-12-28
<Deeznudts> Are there any
<Deeznudts> Apps for snappy as of yet? If so where?
<renat> Hi guys! It's Renat from Screenly. Sorry for bothering you today. I have a question about building a GUI snap.
<renat> Here is a link to the Google document describing how it's built. https://docs.google.com/document/d/14msTXe_cFulk9z4jFptEjFJzZx58b1mWU_r4VivLkfA/edit?hl=en&forcehl=1
<renat> But as you can see - I need to include Mir server inside a snap. (Not as a framework as I can understand)
<renat> So - Mir server should be includedd as a part of the snap in snapcraft.yaml
<renat> But, unfortunately, I can't find any tutorial of including Mir into the snap that way.
<renat> Oh... Sorry. Nevermind. Seems found a useful link. https://bazaar.launchpad.net/~mir-team/+junk/snapcraft-qml-on-mir/view/head:/snapcraft.yaml
<asac> kyrofa: u know why we load config once for every step (afaict??) in execute?
#snappy 2015-12-29
<shuduo> any good way to build a piece of C code to snap for ARM platform? I tried to use snapcraft example downloader-with-wiki-parts but found just add architectures section does not make compiling with arm gcc automatically. even i modify gcc with arm-linux-gnueabihf-gcc but the dependencies still be compiled for amd64. I thought make plugin can do some magic for different architectures. now my question is what
<shuduo> easy way I can build a C-based snap for armhf is?
<ogra_> you casn either do it on real hardware or in a qemu-user-static chroot built by qemu-debootstrap
<ogra_> snapcraft doesnt support cross building yet
<shuduo> ogra_: hmm, seems it's only way i can take now. thanks.
<asac> ogra_: do you know where the config hook for ubuntu-core stuff like network interfaces is?
<ogra_> asac, you mean in the snappy code ? no idea, i just know how to use it
<ogra_> http://paste.ubuntu.com/14258119/ is a script i use for setting up my hosts ...
<asac> ogra_: nevermind. found it in snappy code
<shuduo> ogra_: i managed to get an armhf wily chroot via qemu-debootstrap but apt-get install golang-go always failed. did you try arm chroot before?
<ogra_> shuduo, go has issues with the qemu chroot (broken syscalls in qemu iirc) ... you said C code above ...
<ogra_> (i wouldnt have suggested it for a go project)
<shuduo> ogra_: yes, but i tried to compile C example and it also failed. and err msg show something go stack. i wonder snapcraft should not be related to golang.
<ogra_> hm. then you are likely doomed to do a native build for now
<shuduo> then i tried to install golang-go package but it even can't be installed
<shuduo> ogra_: i submit it as a bug https://bugs.launchpad.net/snapcraft/+bug/1529904
<ubottu> Launchpad bug 1529904 in Snapcraft "downloader-with-wiki-parts build fails in armhf chroot" [Undecided,New]
#snappy 2015-12-30
<liuxg> I have a django python server project. In the project there is a database file to store some data. When the project is deployed, the database is deployed to /apps/MYPROJECT_DIR/current location. the location is not accessible to runtime. How can I deploy my database file? should I deploy it to /var/libs/apps/MYPROJECT_DIR?
<liuxg> in my snapcraft file, can I copy a file like " ./db.sqlite3: /var/lib/apps/restapi.sideload/current/db.sqlite3"?
<yellabs-r2> hello there
<koolkat56> noob here
#snappy 2016-01-01
<alfreako> hi channel. Does anyone know why the snappy tutorials only refer to ubuntu 15.04; i found a .tar.gz download for 15.10 but there's no info on how to use it - should I just extract to /?
#snappy 2016-01-02
<anpok_> I have started using snappy
<ogra_> yay
<anpok_> on a banan pi board.. I want to use that one as nfs server
<anpok_> so the interesting stuff was boring.. it just works
<anpok_> i took a beta image from lemaker .. with 4.2 kernel.. so no graphics drivers
<ogra_> hmm, i wonder how up to date the banana pi is wrt new image technology
<ogra_> (the bootloader handling and setup of things has changed a lot since the last banana pi image i know)
<anpok_> release: ubuntu-core/15.04/edge
<ogra_> well, that only reflects the userspace
<anpok_> ok .. not the device part
<ogra_> right
<anpok_> i was wondering if there is a way to switch release channels..
<ogra_> we keep the stuff backwards compatible so you could have a very old setup, depends on th3e person who does the device part
<ogra_> and if he/she kept it up to date
<anpok_> hm from september
<ogra_> ah, that does sound decent
<anpok_> i thought about buying another one for other purposes.. and getting the mali drivers to work
<ogra_> yeah, we're still quite behind on any graphical stuff
<anpok_> for nfs server I started to create snapcraft.yaml file that pulls in deb files for nfs.. and some libraries..
<anpok_> i am not pulling in a few libraries that i already found in the core image.. is that ok?
<anpok_> or should everything apart from libc and pthreas be duplicated in the snap?
<ogra_> the latter
<ogra_> nobody can guarantee that any libs stay in the core image
<anpok_> ok..
<anpok_> is there a syntax in snapcraft to move files around, that were pulled in from debs?
<ogra_> anpok_, the copy plugin copies all contents of the stage packages
<ogra_> http://bazaar.launchpad.net/~ogra/+junk/ircproxy/view/head:/snapcraft.yaml here is a package that uses deb contents
<enoch85> hi 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.
<anpok_> ogra_: oh ircproxy was another thing i wanted to do
<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 dir
<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)
<kyrofa> enoch85, you would need to bundle apache etc. in the .snap itself
<enoch85> kyrofa, Kyle?
<kyrofa> enoch85, indeed :)
<enoch85> kyrofa, 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 tried
<enoch85> kyrofa, hey btw! :)
<kyrofa> enoch85, haha, hi! Okay, and this is to enable ownCloud, yes?
<enoch85> kyrofa, sec, will send you a link
<kyrofa> enoch85, 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 data
<enoch85> kyrofa, this is my mission: https://owncloud.org/blog/update-about-the-western-digital-and-owncloud-pi-project/
<enoch85> kyrofa, aah ok, but what about the mysql and apache config?
<enoch85> kyrofa, I read that small writes to the SD card is bad practice
<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 reboot
<ogra_> s/partitions/partition/
<kyrofa> ogra_, we're talking about the SD card in the rpi2
<ogra_> yeah
<ogra_> leave the readonly parts there
<ogra_> and move the writable partition to the ssd
<kyrofa> ogra_, ah, interesting idea
<ogra_> by simply moving the label and data over
<ogra_> we mount the partitions by label ... so thats pretty easy
<kyrofa> enoch85, that ^^ would make the SD lifetime quite a bit longer
<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 place
<enoch85> ogra_, thanks! kyrofa that's what I thought
<ogra_> *meta
<enoch85> ogra_, all this is new to me, so I would really appriciate a guide of some kind, or at least the commands of doing this
<ogra_> note though that USB2.0 is limited to 24MB/s ... the disk throughput wont be stellar
<enoch85> ogra_, yeah, I know, but this is what I have to work with
<ogra_> yep
<kyrofa> enoch85, you might want to start walking before you run though-- perhaps focus on getting owncloud working before optimizing?
<kyrofa> enoch85, since you're investigating apache and mysql, I'm assuming you're looking to make an owncloud .snap sans Docker, correct?
<enoch85> kyrofa, 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 Ubuntu
<enoch85> Snappy to run well as a webserver with ownCloud on Apache and MySQL and all the other needed dependencies. :)
<enoch85> kyrofa, then if that means running a Docker container, then yes.
<kyrofa> enoch85, 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?
 * ogra_ always thinks the snappy app confinement is enough to shield apps ... no need for extra container overhead imho ... 
<ogra_> especially since it eats you alive on a rPi
<kyrofa> Yeah, not something I'd recommend either, but that's the only ownCloud .snap that exists right now
<ogra_> yeah
<kyrofa> enoch85, .snaps differ from .debs in a number of ways, but a big one is that .snaps must include their dependencies
<kyrofa> enoch85, which means making an ownCloud .snap "the right way" would be putting apache/php/mysql etc. in a .snap with ownCloud configured as well
 * 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 
<kyrofa> Indeed. enoch85 think of .snaps as deployment solutions for a product
<kyrofa> enoch85, 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 transactionally
<kyrofa> enoch85, if you've got Ubuntu Core running on the rpi2, I suggest you begin looking at Snapcraft for putting the pieces together
<kyrofa> enoch85, 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)
<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)
<kyrofa> ogra_, great example, thank you
<kyrofa> enoch85, perhaps eventually you decide apache2 sucks. Replace with nginx and release an update. End users don't see a difference
<enoch85> kyrofa, 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)
<ogra_> well, pre-configured is up to you indeed :)
<kyrofa> enoch85, yeah you got it
<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 ...
<kyrofa> enoch85, 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.
<ogra_> so in that case you want some pre-config and a snappy config hook to adjust only related settings
<enoch85> kyrofa, 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.sh
<ogra_> why a cron script ?
<enoch85> kyrofa, ogra_ but I will sureley give it a try! you're kind to help!
<ogra_> isnt config migration something you only want to run on upgrades ?
<kyrofa> ogra_, to obtain owncloud releases periodically, I would assume
<ogra_> ah
<kyrofa> ogra_, yeah `php /var/www/owncloud/occ upgrade`
<kyrofa> enoch85, indeed, I understand your hesitation
<kyrofa> enoch85, consider this: what happens if this script fails?
<ogra_> that might need some special handling indeed ... since you would likely want snappy to actually handle the upgrades
<ogra_> to have the rollback feature and keep the download small due to using package diffs etc
<enoch85> ogra_, 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? :)
<ogra_> why would you update the package for config changes ?
<ogra_> dont you want the user to do the config ?
<ogra_> (and keep/migrate it appropriately on SW upgrades)
<kyrofa> ogra_, I think the vision is to have a product that can just be used, is that right enoch85 ?
<enoch85> kyrofa, ogra_ I agree that the scripts isn't totally failsafe, but during the 2 years I've used it I never run into any issues
<enoch85> kyrofa, yes
<ogra_> kyrofa, sure, i just dont understand the concerns about the config
<enoch85> kyrofa, 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 on
<enoch85> ogra_, maybe it's me that doesn't get how it really works, in my mind it seems comlicated
<enoch85> kyrofa, the target audience is noob users
<ogra_> your config lives in the writable space like in every other install
<kyrofa> enoch85, plug in and go, my favorite
<enoch85> kyrofa, that's why everything has to work out of the box, and continue to work for years after that
<kyrofa> enoch85, gotcha
<enoch85> kyrofa, haha ;)
<ogra_> if you upgrade there will be a backup of the old config and the migrated one ...
<enoch85> kyrofa,  mine too
<enoch85> ogra_,
<enoch85> ogra_, ooh, sounds nice!
<ogra_> if you find you cant use the new config you can roll back to the last version of the app
<kyrofa> enoch85, that's what I was talking about regarding the failure ^^
<ogra_> (same fgoes for the OS itself, you can always go back to the last stable state )
<kyrofa> enoch85, your database was backed up, etc
<enoch85> ogra_, 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 uncertan
<ogra_> anyway, there is definitely no need for you to re-roll the package unless there is a new version you want to release
<ogra_> surely not needed for config changes ...
<kyrofa> enoch85, 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?
<enoch85> kyrofa, 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?
<ogra_> yes
<kyrofa> enoch85, correct
<enoch85> kyrofa, sec, will check my schedule
 * ogra_ gets evil looks from the GF on the sofa ... i guess i'll have to switch back to vacation mode ;)
<enoch85> kyrofa, working on monday, but are free on tuesday and wednesday :)
<enoch85> ogra_, haha :D
<enoch85> ogra_, this is what I do on my free time
<kyrofa> enoch85, Tuesday works!
<enoch85> cool, I'll be online
<enoch85> kyrofa, btw, any time difference?
<enoch85> kyrofa, i'm in Sweden
<kyrofa> enoch85, I'm on EST-- you?
<kyrofa> Ha! Yes then :P
<enoch85> Time is 19:58 atm
<enoch85> kyrofa, 12 at your place?
<kyrofa> enoch85, 13:58 here
<enoch85> kyrofa, ok, well, when I'm off I tend to sleep for a while :)
<enoch85> kyrofa, I will be prepared with a clean install of Ubuntu Snappy, and a freshly made partition of the WD HDD. :)
<kyrofa> enoch85, I'm here steady from 0800-1600, just ping me?
<enoch85> kyrofa, yes, I'll ping you :)
<kyrofa> enoch85, excellent :) . I look forward to it!
<kyrofa> enoch85, alright I gotta run
<enoch85> kyrofa, ogra_ thanks for your help! talk to you on tuesday then. looking forward to get this baby up and running. :)
#snappy 2016-01-03
<T3SLA> Hi
<T3SLA> I am trying to install snappy on rpi 2
<T3SLA> can any1 help me with that
<T3SLA> I am new to ubuntu so pls help me
