Re: Prometheus + Collectd (collectd_exporter)

2017-09-05 Thread James Beedy
Disregard the previous email. Here is what I came up with -
http://paste.ubuntu.com/25475631/

On Tue, Sep 5, 2017 at 6:12 PM, James Beedy  wrote:

> @canonical-is-sa https://jujucharms.com/u/canonical-is-sa/collectd/
> xenial/0#charm-config-prometheus_export - wtf
>
> Could someone give an example of how the collectd charm can be configured
> to use the collectd_exporter? The docs for the prometheus_export config are
> slightly confusing :)
>
> Thanks
>
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Prometheus + Collectd (collectd_exporter)

2017-09-05 Thread James Beedy
@canonical-is-sa
https://jujucharms.com/u/canonical-is-sa/collectd/xenial/0#charm-config-prometheus_export
- wtf

Could someone give an example of how the collectd charm can be configured
to use the collectd_exporter? The docs for the prometheus_export config are
slightly confusing :)

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


External IP's

2017-09-05 Thread Micheal B
My lab is juju using vsphere kubernetes - 
https://jujucharms.com/docs/2.1/help-vmware - my nodes all get their IP’s and 
DNS from a local domain server and tested used using the - 
https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ 

All of the Nodes Master and worker have 8GB Mem, 30GB of disk space as well. 
The VMware environment is my main lab and it’s well established, I do allot of 
testing ☺ 

 

 

So as far as I know everything looks good and the logs seem happy on the DNS 
side. I did have to adjust my DHCP Server some and the deployment script to use 
the server but other than that it seems to be fine.  It’s part of the reason I 
am looking for a way to build a deployment YAML file out of my current running 
environment so I can change settings without redepoloying and having to redo 
all of the DNS Server names etc.

 

But when I start testing using this - 
https://kubernetes.io/docs/tutorials/stateless-application/expose-external-ip-address/
 

 

I never get an external IP Address – I have been through several documents and 
test some ingress and such still not getting an IP automatically

 

Now if I do the same above but add in 

 

kubectl expose deployment hello-world --type=LoadBalancer 
--external-ip=192.168.0.162 --name=my-service  – set the externalip= is 
one of my worker nodes then I can hit the deployment fine.  

 

So what else am I missing?   

 

 

Cheers

 

Micheal

 

 

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


Kubernetes backup yaml

2017-09-05 Thread Micheal B
Is there a way to extract your current cluster config to a YAML file for a 
redeployment? 

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


Re: Promulgate request: InfluxDB

2017-09-05 Thread Tim Van Steenburgh
Done.

On Tue, Sep 5, 2017 at 11:55 AM, Tom Haddon 
wrote:

> Hi Folks,
>
> Could we get cs:~influxdb-charmers/influxdb promulgated?
>
> The code for the charm is https://code.launchpad.net/influxdb-charm and
> there's
> a team that maintains it https://launchpad.net/~influxdb-charmers. The
> charm
> supports trusty and xenial.
>
> If anyone is interested in joining the team to help maintain the influxdb
> charm please let us know.
>
> Thanks, Tom
>
> --
> 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


Re: Newbie Question: How do I replace a machine in a deployed Model?

2017-09-05 Thread Raghurama Bhat
Hi Rick,

Thank you very much for your detailed response.  It makes sense that Kubernetes 
Core is not designed for HA and there could be data loss in case of a machine 
failure. My question was more generic in the sense, How do I build self healing 
to the system where I can replace broken machines. In the scenario that you 
describe below, will the remaining workers be correctly associated with the new 
master and etcd? Will it correctly trigger the charm logic on worker machine to 
point it to the new etcd and master?

Thanks,

--Raghu

From: Rick Harding 
Date: Tuesday, September 5, 2017 at 7:42 AM
To: Raghurama Bhat , "juju@lists.ubuntu.com" 

Subject: Re: Newbie Question: How do I replace a machine in a deployed Model?

On Thu, Aug 31, 2017 at 11:07 AM Raghurama Bhat 
mailto:rb...@proofpoint.com>> wrote:
Hi,

I have a newbie question. I deployed a two node Kubernetes Core Cluster using 
Juju  into a MaaS Setup.   Now if I one of the Machine has a hardware failure, 
What is the process for replacing it with another machine? Does Juju controller 
monitor the cluster and request MaaS for a new machine if it detects one of the 
machines is gone? Even if this has to be done manually, I did not see a 
replace-machine option to Juju. Only add and remove units and machines. How 
does this work?

 Juju does not automatically do anything here. The best thing is to have proper 
monitoring on your machines and in case of a failure such as this you can 
update things in a number of ways. If you want to replace exactly what's on the 
failed machine in this case it depends on if it was the first or second machine 
the bundle uses.

If it was the second one, it looks like that's only the kubernetes-worker node 
and so you can create a new one with:

juju add-unit kubernetes-worker

The constraints from the bundle should still be in place, the config will be 
the same, etc.

If it's the first machine that went down. That's trickier because it has some 
colocated applications on it. So you'd want to add-unit to something that gets 
a newly allocated machine:

juju add-unit kubernetes-master

And then put back the other services using placement directives [1]

juju add-unit etcd --to=3 # this assumes that the newly created machine for 
the kubernetes-master is #3
juju add-unit easyrsa --to lxd:3


One thing to note is that since you're using the non-HA production bundle that 
there's no fail over of the actual data running in the applications. Your 
Kubernetes master will get any charm config that's been set before, but it 
won't have any work you did directly against the Kubernetes cluster.


Typically, we'd suggest that you have things in an HA setup and with monitoring 
such that you could then detect a failure, and respond to that how you wish. 
You might add-units into containers on existing machines, you might allocate 
new machines, or some other response to the failure.

Rick


1: 
https://jujucharms.com/docs/2.2/charms-deploying#deploying-to-specific-machines-and-containers
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: Newbie Question: How do I replace a machine in a deployed Model?

2017-09-05 Thread Raghurama Bhat
Hi Dmitrii,

Thank you very much for your detailed response. I now understand that it is not 
in the scope of Juju to monitor instances and replace them. I had come across 
elastisys, but that is more for horizontal scaling and I am primarily looking 
for High Availability and self healing although elastic scaling would be nice 
too.

The approach you suggested of monitoring the instances and using libjuju to 
replace the broken machine with a new one and execute add-unit on them makes 
sense.

Thanks,

--Raghu


From: Dmitrii Shcherbakov 
Date: Saturday, September 2, 2017 at 12:50 PM
To: Raghurama Bhat 
Cc: "juju@lists.ubuntu.com" 
Subject: Re: Newbie Question: How do I replace a machine in a deployed Model?

Hi Raghurama,

> Does Juju controller monitor the cluster and request MaaS for a new machine 
> if it detects one of the machines is gone?

No, it doesn't.

> Even if this has to be done manually, I did not see a replace-machine option 
> to Juju.

There's no such functionality - either an operator needs to make a decision to 
do it or you need an automated system to do that depending on some custom logic.

> Only add and remove units and machines. How does this work?

Juju itself does not know anything about applications you deploy - any 
application-specific knowledge must be present in charms.

What you are looking for is an orchestrator type of capability - it will be a 
layer on top of Juju or a charm with 'super cow powers' (namely, with admin 
access to a juju controller).

A proof of concept would be a charmscaler from elastisys - it talks to a juju 
controller directly and scales based upon CPU usage from nodes collected via 
telegraf:
https://github.com/elastisys/layer-charmscaler-base/blob/164d163b4104cc47dcb1a32019509ba3f61d91eb/config.yaml#L9-L28
https://github.com/elastisys/layer-charmscaler#how-the-charmscaler-operates
https://jujucharms.com/u/elastisys/

https://github.com/elastisys/bundle-autoscaled-kubernetes
https://jujucharms.com/u/elastisys/autoscaled-kubernetes/bundle/0

https://elastisys.com/cloud-platform-features/predictive-auto-scaling/

You could build your own orchestrator with help of 
https://github.com/juju/python-libjuju
 depending on your criteria. The whole system could look as follows:

telegraf with your own juju input plugin -> prometheus alerts -> orchestrator 
-> juju controller

The telegraf plugin would query juju and/or MAAS periodically to determine the 
number of non-failed workers and send those metrics to prometheus.

Googling a little bit, I have found somebody's http server 
https://github.com/imgix/prometheus-am-executor

Promulgate request: InfluxDB

2017-09-05 Thread Tom Haddon
Hi Folks,

Could we get cs:~influxdb-charmers/influxdb promulgated?

The code for the charm is https://code.launchpad.net/influxdb-charm and there's
a team that maintains it https://launchpad.net/~influxdb-charmers. The charm
supports trusty and xenial.

If anyone is interested in joining the team to help maintain the influxdb
charm please let us know.

Thanks, Tom

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


Re: Newbie Question: How do I replace a machine in a deployed Model?

2017-09-05 Thread Rick Harding
On Thu, Aug 31, 2017 at 11:07 AM Raghurama Bhat 
wrote:

> Hi,
>
>
>
> I have a newbie question. I deployed a two node Kubernetes Core Cluster
> using Juju  into a MaaS Setup.   Now if I one of the Machine has a hardware
> failure, What is the process for replacing it with another machine? Does
> Juju controller monitor the cluster and request MaaS for a new machine if
> it detects one of the machines is gone? Even if this has to be done
> manually, I did not see a replace-machine option to Juju. Only add and
> remove units and machines. How does this work?
>

 Juju does not automatically do anything here. The best thing is to have
proper monitoring on your machines and in case of a failure such as this
you can update things in a number of ways. If you want to replace exactly
what's on the failed machine in this case it depends on if it was the first
or second machine the bundle uses.

If it was the second one, it looks like that's only the kubernetes-worker
node and so you can create a new one with:

juju add-unit kubernetes-worker

The constraints from the bundle should still be in place, the config will
be the same, etc.

If it's the first machine that went down. That's trickier because it has
some colocated applications on it. So you'd want to add-unit to something
that gets a newly allocated machine:

juju add-unit kubernetes-master

And then put back the other services using placement directives [1]

juju add-unit etcd --to=3 # this assumes that the newly created machine
for the kubernetes-master is #3
juju add-unit easyrsa --to lxd:3

One thing to note is that since you're using the non-HA production bundle
that there's no fail over of the actual data running in the applications.
Your Kubernetes master will get any charm config that's been set before,
but it won't have any work you did directly against the Kubernetes cluster.

Typically, we'd suggest that you have things in an HA setup and with
monitoring such that you could then detect a failure, and respond to that
how you wish. You might add-units into containers on existing machines, you
might allocate new machines, or some other response to the failure.

Rick


1:
https://jujucharms.com/docs/2.2/charms-deploying#deploying-to-specific-machines-and-containers
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: How to deploy the same charm with different name?

2017-09-05 Thread fengxia

Ah, how wonderful!

On 09/04/2017 03:56 PM, Tom Barber wrote:

simply:

juju deploy [charm] newcharmname

is what you're after.

Tom

On Mon, Sep 4, 2017 at 8:49 PM, fengxia > wrote:


Hi Juju,

Previously, I was able to define two charms in bundle, both have
`charm` (the path to charm files) set to the same location, but
with different names, and `juju deploy this-bundle` will create
two applications.

For example (bundle):

Sevices:

   A:

 charm: ./trusty/mycharm

.

   B:

  charm: ./trusty/mycharm

Deploying this will create two applications, named "A" and "B".

How to achieve this using two-step $ juju deploy [charm]
commandline instead? On the second time Juju complained that
application "mycharm" already exist.


-- 
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





--
Tom Barber
CTO Spicule LTD
t...@spicule.co.uk 

http://spicule.co.uk

@spiculeim 

Schedule a meeting with me 

GB: +44(0)5603641316 
US: +18448141689 




--
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