juju is devops distilled
Go Python Shell PHP HTML PowerShell
Switch branches/tags
Latest commit 256d629 Jan 2, 2018 @jujubot jujubot Merge pull request #8251 from axw/caasoperatorprovisioner-test-fixes
worker/caasoperatorprovisioner: fix tests

## Description of change

Fix some test races, and also a gaping hole
in one test where it returns early.

## QA steps

go test -race
(non functional change)

## Documentation changes

None.

## Bug reference

None.
Permalink
Failed to load latest commit information.
.ci drop ppa from check-merge groovy Oct 13, 2017
acceptancetests Remove use of now non-existent chaos module. Dec 13, 2017
agent Refactor symlink creation into a common package so it can be used by … Nov 23, 2017
api CAAS workers use new application config Dec 13, 2017
apiserver Add Uniter API upward compatibility for NetworkInfo endpoint. Dec 16, 2017
caas Rework application config so CAAS stuff is separate to IAAS stuff Dec 14, 2017
cert cert: drop bogus DNSName in Verify Oct 13, 2017
charmstore Update to use stable charm.v6 and charmrepo.v2 upstreams Nov 20, 2017
cloud Add support for --config key=value for juju deploy Dec 13, 2017
cloudconfig Default GW for containers Nov 27, 2017
cmd Fix non-finalizing update-credential command. Dec 27, 2017
component/all Move some shared files and errors etc from worker uniter to worker co… Nov 30, 2017
constraints Delete dead/unused code Jun 13, 2017
container propagate host's AZ to containers Aug 31, 2017
controller Modifies management space comment. Dec 13, 2017
core Rework application config so CAAS stuff is separate to IAAS stuff Dec 14, 2017
doc Renaming *-tools commands to *-agents, making old names into aliases. Nov 7, 2017
downloader Merge develop branch Oct 18, 2016
environs Don't allow non-simple types for unknown attributes Dec 18, 2017
etc/bash_completion.d Switch to classic snap Feb 7, 2017
feature Remove cross-model feature flag Sep 1, 2017
featuretests Fix non-finalizing update-credential command. Dec 27, 2017
generate Merge develop branch Oct 18, 2016
instance Add doc comment for InstanceFirewaller Sep 27, 2017
juju Move common hook command logic to worker/common/hooks Nov 29, 2017
jujuclient don't cache model count on controller. Aug 30, 2017
logfwd Changes after review from juju/utils. Nov 10, 2016
migration Merge branch 'develop' into state-controller-refactor-merge-develop Nov 22, 2017
mongo Merge branch 'develop' into merge-2.3-281117 Nov 27, 2017
network network/iptables: add package Dec 11, 2017
patches Update readme for patches Nov 15, 2017
payload Rename worker/common/runner to worker/common/charmrunner Nov 30, 2017
permission Delete dead/unused code Jun 13, 2017
provider Fix non-finalizing update-credential command. Dec 27, 2017
pubsub The pubsub forwarder runs in each API server machine to forward the m… Jun 6, 2017
releasetests CI/Release: Reintroduce removed script. Dec 7, 2017
resource Move some shared files and errors etc from worker uniter to worker co… Nov 30, 2017
rpc Merge branch 'develop' into state-controller-refactor Nov 16, 2017
scripts Merge pull request #8135 from jameinel/2.3-generate-password Dec 18, 2017
service Delete dead/unused code Jun 13, 2017
snap Merge remote-tracking branch 'origin/develop' into add-patches-to-builds Nov 29, 2017
state Makes assertions for absent APIHostPorts documents more elegant. Dec 20, 2017
status Remove the broken status history squashing. Nov 28, 2017
storage storage: add "Provider.Releasable()" method Aug 30, 2017
testcharms Added a pre/post-deploy steps to budle deploy for metric registration. Dec 8, 2017
testing Add support for migrating applications with passwords Dec 15, 2017
tools storage: add {Filesystem,Volume}Importer Jul 17, 2017
upgrades Add an upgrade step to move old audit logs Nov 28, 2017
utils Support for CIDR in no_proxy value (internally) Sep 12, 2017
version Increment version to 2.4-beta1 Nov 28, 2017
watcher watcher/watchertest: mock strings watcher Dec 4, 2017
worker worker/caasoperatorprovisioner: fix tests Jan 2, 2018
wrench wrench: log at TRACE level Nov 13, 2017
.gitignore Remove *.pyc, add to gitignore May 19, 2017
CONTRIBUTING.md remove extra dash in url Aug 9, 2017
FAQ.txt Merge develop branch Oct 18, 2016
ISSUE_TEMPLATE.md Adding issues and pull request templates for the project. Jan 9, 2017
LICENCE AGPL v3 License Mar 27, 2015
Makefile application ConfigSettings() now populates any charm defaults Dec 6, 2017
PULL_REQUEST_TEMPLATE.md Adding issues and pull request templates for the project. Jan 9, 2017
README.md Convert to using go-1.9 for PR jobs, update readme to refer to snap f… Oct 11, 2017
dependencies.tsv Merge pull request #8175 from alesstimec/bundle-charm-registration Dec 20, 2017
dependencies_test.go Check for white space in dependencies.tsv Jun 2, 2015
doc.go Adapt imports, metadata, and tests for the github move Jun 3, 2014

README.md

juju

juju is devops distilled.

Juju enables you to use Charms to deploy your application architectures to EC2, OpenStack, Azure, GCE, your data center, and even your own Ubuntu based laptop. Moving between models is simple giving you the flexibility to switch hosts whenever you want — for free.

For more information, see the docs.

Getting started

juju is written in Go (http://golang.org), a modern, compiled, statically typed, concurrent language. This document describes how to build juju from source.

If you are looking for binary releases of juju, they are available in the snap store

snap install juju --classic

Installing Go

Juju's source code currently depends on Go 1.9. One of the easiest ways to install golang is from a snap. You may need to first install the snap client. Installing the golang snap package is then as easy as

snap install go --classic

You can read about the "classic" confinement policy here

If you want to use apt, then you can add the juju-golang PPA and then run the following

sudo apt install golang-1.9

Alternatively, you can always follow the official binary installation instructions

Setting GOPATH

When working with the source of Go programs, you should define a path within your home directory (or other workspace) which will be your GOPATH. GOPATH is similar to Java's CLASSPATH or Python's ~/.local. GOPATH is documented online at http://golang.org/pkg/go/build/ and inside the go tool itself

go help gopath

Various conventions exist for naming the location of your GOPATH, but it should exist, and be writable by you. For example

export GOPATH=${HOME}/work
mkdir $GOPATH

will define and create $HOME/work as your local GOPATH. The go tool itself will create three subdirectories inside your GOPATH when required; src, pkg and bin, which hold the source of Go programs, compiled packages and compiled binaries, respectively.

Setting GOPATH correctly is critical when developing Go programs. Set and export it as part of your login script.

Add $GOPATH/bin to your PATH, so you can run the go programs you install:

PATH="$GOPATH/bin:$PATH"

Getting juju

The easiest way to get the source for juju is to use the go get command.

go get -d -v github.com/juju/juju/...

This command will checkout the source of juju and inspect it for any unmet Go package dependencies, downloading those as well. go get will also build and install juju and its dependencies. To checkout without installing, use the -d flag. More details on the go get flags are available using

go help get

At this point you will have the git local repository of the juju source at $GOPATH/src/github.com/juju/juju. The source for any dependent packages will also be available inside $GOPATH. You can use git pull --rebase, or the less convenient go get -u github.com/juju/juju/... to update the source from time to time. If you want to know more about contributing to juju, please read the CONTRIBUTING companion to this file.

Installing prerequisites

Runtime Dependencies

You can use make install-dependencies or, if you prefer to install them manually, check the Makefile target.

This will add some PPAs to ensure that you can install the required golang and mongodb-server versions for precise onwards, in addition to the other dependencies.

Build Dependencies

Before you can build Juju, see Dependency management section of CONTRIBUTING to ensure you have build dependencies setup.

Building juju

go install -v github.com/juju/juju/...

Will build juju and install the binary commands into $GOPATH/bin. It is likely if you have just completed the previous step to get the juju source, the install process will produce no output, as the final executables are up-to-date.

If you do see any errors, there is a good chance they are due to changes in juju's dependencies. See the Dependency management section of CONTRIBUTING for more information on getting the dependencies right.

Using juju

After following the steps above you will have the juju client installed in GOPATH/bin/juju. You should ensure that this version of juju appears earlier in your path than any packaged versions of juju, or older Python juju commands. You can verify this using

which juju

You should be able to bootstrap a local model now with the following:

juju bootstrap localhost

Installing bash completion for juju

make install-etc

Will install Bash completion for juju cli to /etc/bash_completion.d/juju. It does dynamic completion for commands requiring service, unit or machine names (like e.g. juju status , juju ssh , juju terminate-machine <machine#>, etc), by parsing cached juju status output for speedup. It also does command flags completion by parsing juju help ... output.

Building Juju as a Snap Package

Building

Make sure your snapcraft version is >= 2.26. Run snapcraft at the root of the repository. A snap will build.

Current State

Classic mode.

Known Issues

None. The snap shares your current credentials and environments as expected with a debian installed version.

Needed for confinement

To enable strict mode, the following bugs need to be resolved, and the snap updated accordingly.