GithubHelp home page GithubHelp logo

johnlettman / charm-local-juju-users Goto Github PK

View Code? Open in Web Editor NEW

This project forked from canonical/charm-local-juju-users

0.0 1.0 0.0 54 KB

License: Apache License 2.0

Python 96.54% Jinja 3.46%

charm-local-juju-users's Introduction

Local Juju Users

A subordinate charm for syncing Juju accounts and local UNIX group users.

The charm creates Juju account for every local UNIX group member, gives them admin access to all locally available controllers and models, sets up SSH keys and adds them to all models.

Supports Ubuntu 18.04, 20.04 and 22.04 releases. It has been tested against Juju 2.9 and Juju 3.0.

Installation

juju deploy ch:local-juju-users local-juju-users
juju relate local-juju-users <principal-charm>

Configuration

juju config local-juju-users <option>=<value>

Available configuration options:

Name Description Examples Default
source-unix-group The UNIX group that will be used to source the list of users to be added to the juju model. sre-squad ubuntu
ignored-accounts A comma separated list of Juju accounts that will be ignored by the charm. admin,prometheus-juju-exporter admin
juju-admin-unix-account The UNIX account that will be used to add users to the juju model. ubuntu ubuntu
sync-schedule User account sync schedule in cron format. "10,25,40,55 * * * *" "@daily" "@hourly" "@daily"
site-name This is the name that will be used to identify the remote site in the bash prompt. It can be useful to set this to the name of the cloud or datacenter location. Example-West-1 Juju
default-juju-model The Juju model that will be used as the default model when accessing juju for the first time. If empty, the first available controller and model will be selected. "foundations-maas:admin/openstack" ""
sync-extra-paths A list of paths to files and directories to be synced between "juju-admin-unix-account" and "source-unix-group" members. The expected format is a YaML list of <source>:<destination> strings. The underlying tool used for syncing these files is rsync. ["/home/ubuntu/admin.novarc:/home/$USER/admin.novarc", "/home/ubuntu/.kube/:/home/$USER/.kube"] ""

Usage

To sync user accounts manually, run the synchronize-accounts action.

# on Juju 2.9
juju run-action --wait local-juju-users/leader synchronize-accounts
# on Juju 3.0
juju run --wait=15m local-juju-users/leader synchronize-accounts

Note: The first sync should be executed on the leader since it's responsible for setting up access to the controllers and generating passwords. Sync attempts on non-leaders will fail until the first full sync on the leader completes successfully.

Note 2: The charm sets up a cron job that will attempt to sync accounts periodically, based on the interval defined in the sync-schedule config option.

Other resources

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.