The Juju Show #18 - testing new storage features

2017-08-02 Thread Rick Harding
In the show today we talked about testing out the new storage features
coming in Juju 2.3. Now's a great time to test things out, update your
charms, and see how these big changes will enable you to operate
applications better. I wanted to drop a bunch of links here that I mention
in the show.

How do I get it? Use the edge snap
http://mitechie.com/blog/2017/7/20/testing-the-future-of-juju-with-snaps

Where can I test it?
with AWS, GCE, Azure, OpenStack, and LXD (ooh new fancy storage tools)

Any documentation in progress?

https://jujucharms.com/docs/master/charms-storage
https://jujucharms.com/docs/master/developer-storage
https://awilkins.id.au/post/juju-2.3-storage/

Test it out and let us know what questions you have and I'd love to see a
suite of charms growing the ability to operate storage needs much better
between now and when Juju 2.3 comes out.

Rick
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: The Juju Show #18 - testing new storage features

2017-08-02 Thread Rick Harding
And to watch the show for those that miss my dulcet tones:

https://www.youtube.com/watch?v=jrOP3nHNRcs

On Wed, Aug 2, 2017 at 2:42 PM Rick Harding 
wrote:

> In the show today we talked about testing out the new storage features
> coming in Juju 2.3. Now's a great time to test things out, update your
> charms, and see how these big changes will enable you to operate
> applications better. I wanted to drop a bunch of links here that I mention
> in the show.
>
> How do I get it? Use the edge snap
> http://mitechie.com/blog/2017/7/20/testing-the-future-of-juju-with-snaps
>
> Where can I test it?
> with AWS, GCE, Azure, OpenStack, and LXD (ooh new fancy storage tools)
>
> Any documentation in progress?
>
> https://jujucharms.com/docs/master/charms-storage
> https://jujucharms.com/docs/master/developer-storage
> https://awilkins.id.au/post/juju-2.3-storage/
>
> Test it out and let us know what questions you have and I'd love to see a
> suite of charms growing the ability to operate storage needs much better
> between now and when Juju 2.3 comes out.
>
> Rick
>
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


LXD bootstrap inside KVM failed

2017-08-02 Thread fengxia

Hi Juju,

I have a 16.04 KVM. Installed juju and LXD from apt.

$ juju bootstrap localhost test

ERROR creating LXD client: can't connect to the local LXD server: Get 
http://unix.socket/1.0: read unix @->/var/lib/lxd/unix.socket: read: 
connection reset by peer


Please install LXD by running:
$ sudo apt-get install lxd
and then configure it with:
$ newgrp lxd
$ lxd init

Tried the suggested commands. Rebooted KVM. No avail.

Is this because I'm running LXD inside KVM?

--
Feng xia
Engineer
Lenovo USA

Phone: 5088011794
fx...@lenovo.com

Lenovo.com
Twitter | Facebook | Instagram | Blogs | Forums


--
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: LXD bootstrap inside KVM failed

2017-08-02 Thread fengxia

Here is an update. Manually run this command,

$ sudo lxd --group lxd

Then $ lxc list works. So the LXD service was not started after reboot. 
Permission issue?


On 08/02/2017 03:33 PM, fengxia wrote:

Hi Juju,

I have a 16.04 KVM. Installed juju and LXD from apt.

$ juju bootstrap localhost test

ERROR creating LXD client: can't connect to the local LXD server: Get 
http://unix.socket/1.0: read unix @->/var/lib/lxd/unix.socket: read: 
connection reset by peer


Please install LXD by running:
$ sudo apt-get install lxd
and then configure it with:
$ newgrp lxd
$ lxd init

Tried the suggested commands. Rebooted KVM. No avail.

Is this because I'm running LXD inside KVM?



--
Feng xia
Engineer
Lenovo USA

Phone: 5088011794
fx...@lenovo.com

Lenovo.com
Twitter | Facebook | Instagram | Blogs | Forums


--
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: LXD bootstrap inside KVM failed

2017-08-02 Thread fengxia

When running the service:

$ sudo service lxd start

Failed with:

A dependency job for lxd.service failed. See 'journalctl -xe' for details.

More info from $ service lxd status:

-- Subject: Unit lxd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit lxd.service has failed.
--
-- The result is dependency.
Aug 02 15:40:00 mail.lctc-buildbot.labs.lenovo.com systemd[1]: 
lxd.service: Job lxd.service/start failed with result 'dependency'.
Aug 02 15:40:00 mail.lctc-buildbot.labs.lenovo.com systemd[1]: 
lxd-bridge.service: Unit entered failed state.
Aug 02 15:40:00 mail.lctc-buildbot.labs.lenovo.com systemd[1]: 
lxd-bridge.service: Failed with result 'exit-code'.
Aug 02 15:40:01 mail.lctc-buildbot.labs.lenovo.com CRON[4314]: 
pam_unix(cron:session): session opened for user www-data by (uid=0)
Aug 02 15:40:01 mail.lctc-buildbot.labs.lenovo.com CRON[4317]: 
(www-data) CMD ([ -x /usr/share/awstats/tools/update.sh ] && 
/usr/share/awstats/tools/update.sh)
Aug 02 15:40:01 mail.lctc-buildbot.labs.lenovo.com CRON[4314]: 
pam_unix(cron:session): session closed for user www-data
Aug 02 15:40:01 mail.lctc-buildbot.labs.lenovo.com CRON[4315]: 
pam_unix(cron:session): session opened for user root by (uid=0)
Aug 02 15:40:01 mail.lctc-buildbot.labs.lenovo.com CRON[4321]: (root) 
CMD (   test -x /etc/cron.daily/popularity-contest && 
/etc/cron.daily/popularity-contest --crond
Aug 02 15:40:01 mail.lctc-buildbot.labs.lenovo.com CRON[4316]: 
pam_unix(cron:session): session opened for user sogo by (uid=0)
Aug 02 15:40:01 mail.lctc-buildbot.labs.lenovo.com CRON[4322]: (sogo) 
CMD (/usr/sbin/sogo-tool expire-sessions 30 >/dev/null 2>&1; 
/usr/sbin/sogo-ealarms-notify >/dev
Aug 02 15:40:01 mail.lctc-buildbot.labs.lenovo.com CRON[4315]: 
pam_unix(cron:session): session closed for user root
Aug 02 15:40:02 mail.lctc-buildbot.labs.lenovo.com CRON[4316]: 
pam_unix(cron:session): session closed for user sogo




On 08/02/2017 03:33 PM, fengxia wrote:

Hi Juju,

I have a 16.04 KVM. Installed juju and LXD from apt.

$ juju bootstrap localhost test

ERROR creating LXD client: can't connect to the local LXD server: Get 
http://unix.socket/1.0: read unix @->/var/lib/lxd/unix.socket: read: 
connection reset by peer


Please install LXD by running:
$ sudo apt-get install lxd
and then configure it with:
$ newgrp lxd
$ lxd init

Tried the suggested commands. Rebooted KVM. No avail.

Is this because I'm running LXD inside KVM?



--
Feng xia
Engineer
Lenovo USA

Phone: 5088011794
fx...@lenovo.com

Lenovo.com
Twitter | Facebook | Instagram | Blogs | Forums


--
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: LXD bootstrap inside KVM failed

2017-08-02 Thread fengxia

For anyone, the solution is rather strange:

$ sudo service stop bind9

$ sudo lxd start

Reference: https://github.com/lxc/lxd/issues/2046


On 08/02/2017 03:33 PM, fengxia wrote:

Hi Juju,

I have a 16.04 KVM. Installed juju and LXD from apt.

$ juju bootstrap localhost test

ERROR creating LXD client: can't connect to the local LXD server: Get 
http://unix.socket/1.0: read unix @->/var/lib/lxd/unix.socket: read: 
connection reset by peer


Please install LXD by running:
$ sudo apt-get install lxd
and then configure it with:
$ newgrp lxd
$ lxd init

Tried the suggested commands. Rebooted KVM. No avail.

Is this because I'm running LXD inside KVM?



--
Feng xia
Engineer
Lenovo USA

Phone: 5088011794
fx...@lenovo.com

Lenovo.com
Twitter | Facebook | Instagram | Blogs | Forums


--
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: How do upgrades handle resources?

2017-08-02 Thread Cory Johns
Merlijn,

I agree that the documentation around that could be clearer.  The way that
it works is that, just like charms, resources have revisions, and both are
specified when releasing a charm to a channel.  Then, `juju upgrade-charm`
will update both to the current version for the channel you're using, and
the charm's upgrade-charm hook will get fired if either had changed.

So, in more detail, let's say you push a charm to the store that specifies
resources in its metadata.yaml.  You then cannot release that charm
revision to any channel without specifying which resource revision to use
for every resource specified in the charm's metadata.yaml.

To get a resource revision, you have to upload the resource file to the
store using `charm attach`.  The messages you get from charm-attach can be
a bit confusing, though, because you have to specify a revision or channel
of the charm when attaching a resource, but that channel or revision are
ignored as far as I can tell.  You can also specify a resource file when
pushing a new charm revision using the --resource option for `charm push`.

Note that, because you can't release a charm rev to a channel without
providing a resource rev, all charms are required to have *some* file in
the store for the resource, even if it's an empty file.  This decision was
made to ensure that charms using resources could always be deployed from
the store and that using a placeholder resource would have to be a
conscious decision and not an accidental one.

Once you have a resource revision as well as a charm revision, you can
release both to a channel with, e.g., `charm release --channel=edge
cs:~johnsca/test-1 --resource foo-0`.  Then, anyone who deploys or upgrades
to that charm rev will also get the foo-0 resource.  If you decide that you
need to update the resource without updating the charm code, you can use
`charm attach` again to get a foo-1 resource, and then release to edge with
the same charm rev but the new resource rev (`charm release --channel=edge
cs:~johnsca/test-1 --resource foo-1`), or vice-versa to update just the
charm code and keep the same resource.

If the juju admin uses `juju attach` (or `juju deploy --resource`) to
provide a local file to use as the resource, it will of course bypass
whatever's specified in the store and will always trigger the upgrade-charm
hook with the new resource.


On Fri, Jul 28, 2017 at 10:34 AM, Merlijn Sebrechts <
merlijn.sebrec...@gmail.com> wrote:

> Hi all
>
>
> I'm not sure how resources and upgrades work together. I see that the
> kubernetes layers use resources, but you upgrade kubernetes using `juju
> upgrade-charm`. How does that work? Does each charm version have a "default
> resource" attached?
>
> The resources docs don't really explain this either.. https://jujucharms.
> com/docs/2.1/developer-resources
>
>
>
> Kind regards
> Merlijn
>
> --
> Juju mailing list
> Juju@lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/juju
>
>
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju