Skip to main content

Your submission was sent successfully! Close

Thank you for signing up for our newsletter!
In these regular emails you will find the latest updates from Canonical and upcoming events where you can meet our team.Close

Thank you for contacting us. A member of our team will be in touch shortly. Close

An error occurred while submitting your form. Please try again or file a bug report. Close

  1. Blog
  2. Article

Ellen Arnold
on 17 March 2016

Juju Charm Partner News: March 2016


In this issue:

  • New features, tips and tricks: Juju’s Leadership feature
  • Ecosystem growth: New Partners and Charms
  • Upcoming events: Juju Office Hours, OpenStack Developer Summit and more

Leadership

With Juju 2.0 around the corner we’d like to dedicate this month’s tips section to Leadership. In the Juju context when we say Leadership we mean the Leader election concept as defined for distributed computing. Leadership election provides you (as a charm author) with a means of querying the various nodes of your service for leadership status, setting status, and ensuring that all your units are in a consistent state with regard to an authoritative source for charm configuration settings.

We’ve had documentation for how to use leadership in your charm for a while now, however with the advent of the new layer based approach for charms, we felt now would be a good time to show you the leadership layer. Like all layers, it removes the need to manually write your own hooks.

This layer will initialize charms.reactive states, allowing you to write handlers that will be activated by these states. It allows you to completely avoid writing leader-elected and leader-settings-changed hooks. As a simple example, these two handlers are all that is required to make the leader unit generate a password if it is not already set,
and have the shared password stored in a file on all units:

python
import charms.leadership
from charmhelpers.core.host import pwgen


@when('leadership.is_leader')
@when_not('leadership.set.admin_password')
def generate_secret():
    charms.leadership.leader_set(admin_password=pwgen())


@when('leadership.changed.admin_password')
def store_secret():
    write_file('/etc/foopass', leader_get('admin_password'))

You can find the rest of the tutorial in the layer README file, which includes instructions on how to get started and advanced usage.

You can find this layer, along with dozens of other reusable layers on interfaces.juju.solutions. If you’re interested in contributing layers, or reusing layers to make your charms simpler and easier to maintain, let us know.

Ecosystem Growth

The Charm Partner Programme is excited to welcome Spicule LTD and WANdisco.

Spicule offer application modelling and deployment service. Spicule can help migrate existing applications on or off premise, provide training to your system administrators or manage the systems themselves. Spicule also offers development services for companies who use or are considering using the Juju platform and require software not currently available in the charm store to be made available to their platform.

WANdisco will be charming their Fusion Platform, which delivers core functionality supporting continuous availability and performance. Fusion guarantees data consistency across Hadoop clusters deployed on any combination of distributions, Hadoop compatible storage systems or cloud environments any distance apart.

Upcoming Events

OpenStack Developer Summit

The Canonical team will be travelling to Austin, for the OpenStack Summit – a four day conference for developers, users and administrators of OpenStack software.
If you are planning to attend the OpenStack Summit, join us to discuss your cloud strategy and learn about our solutions:

  • Visit the Ubuntu Booth #A20 to speak to our cloud experts and see our latest demos
  • Join our dedicated Track Day
  • Attend our presentations on the main track talks
  • Meet us at the Container Bar during the Community party on Tuesday, April 26

Juju Office Hours

 

Juju Office Hours is a freeflow meeting where we discuss what’s happening in and around the ecosystem, what hot new changes are landing in charms and Juju itself, and our favorite part, you can join in and ask the team questions about anything Juju related.

Date: Friday, 25 March 2016
Time: 2100 (9pm) UTC, 1600 (4pm) EST, 1300 (1pm) PST
Where: http://ubuntuonair.com for the stream
Participate: #juju on freenode

We will cover as many topics as we can in an hour, and take questions
from the crowd. If you want to participate in the hangout itself ping
me ahead of time and we’d love to have you onboard.

Juju Charmer Summit

Over 100 Juju enthusiasts gathered this week for our second Juju Charmer Summit in beautiful Gent, Belgium as part of the Config Management Camp. Check out our summary of the event and don’t forget to watch our video sessions online.

 

Contact us! For more information on the Charm Partner Programme, please visit http://partners.ubuntu.com/programmes/charm

Related posts


Ishani Ghoshal
8 July 2025

What our users make with Ubuntu Pro – Episode 1

Ubuntu Article

Secure homelabs – and more – for the entire family Ubuntu Pro isn’t just for enterprises – it’s for the passionate community that powers and supports open source every day. From secure remote access to homelab hardening, Ubuntu Pro helps users get more from their systems, whether at work or at home. In this series, ...


Edoardo Barbieri
7 July 2025

The State of Silicon and Devices – Q2 2025 Roundup

Internet of Things Article

Welcome to the Q2 2025 edition of the State of Silicon and Devices by Canonical. In this quarter, we have seen momentum accelerate in edge computing, as well as growing interest in hardware platforms designed for AI, automation, and long-term maintainability. From Ubuntu Desktop arriving on Qualcomm’s Dragonwing processors, to demonstrati ...


Gabriel Aguiar Noury
3 July 2025

JetPack 4 EOL – how to keep your userspace secure during migration

Ubuntu Article

NVIDIA JetPack 4 reached its end-of-life (EOL) in November 2024, marking the end of security updates for this widely deployed stack. JetPack 4 has driven innovation in countless devices powered by NVIDIA Jetson, serving as the foundation of edge AI production deployments across multiple sectors. But now, the absence of security maintenanc ...