Skip to content
This repository was archived by the owner on Mar 4, 2024. It is now read-only.

Commit be96e29

Browse files
committedJun 24, 2019
refresh with recent juju changes
- use pip3 to install charm-tools - use current charm build path envars - lint readme and update with current links
1 parent d2b2f84 commit be96e29

File tree

3 files changed

+49
-45
lines changed

3 files changed

+49
-45
lines changed
 

‎Dockerfile

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
FROM jujusolutions/jujubox:latest
2-
LABEL maintainer "Charles Butler <charles.butler@canonical.com>"
Has a conversation. Original line has a conversation.
2+
LABEL maintainer="kevin.monroe@canonical.com"
33

44
ARG JUJU_USER=ubuntu
55

6-
ENV LAYER_PATH=/home/$JUJU_USER/charms/layers
7-
ENV INTERFACE_PATH=/home/$JUJU_USER/charms/interfaces
6+
ENV CHARM_LAYERS_DIR=/home/$JUJU_USER/charms/layers
7+
ENV CHARM_INTERFACES_DIR=/home/$JUJU_USER/charms/interfaces
8+
9+
RUN mkdir -p /home/$JUJU_USER/.cache
10+
RUN chown -R $JUJU_USER:$JUJU_USER /home/$JUJU_USER/.cache
811

912
ADD charmbox-setup.sh /charmbox-setup.sh
1013
RUN /charmbox-setup.sh

‎README.md

+42-41
Original file line numberDiff line numberDiff line change
@@ -1,115 +1,116 @@
11
# Charm Box
22

33
Charm box is a container project that provides a [Juju](https://jujucharms.com)
4-
[Charm](https://jujucharms.com/docs/stable/charms) development environment. The
5-
charmbox container includes tools for building, testing, and reviewing Juju
6-
Charms.
4+
[Charm](https://docs.jujucharms.com/applications-and-charms) development
5+
environment. The charmbox container includes tools for building, testing, and
6+
reviewing Juju Charms.
77

8-
Juju is an open source, universal model for applications. Juju allows you to
9-
deploy, configure, manage, maintain, and scale cloud services quickly and
8+
Juju is an open source, universal model for applications. Juju allows you to
9+
deploy, configure, manage, maintain, and scale cloud services quickly and
1010
efficiently on public clouds, as well as on physical servers.
1111

1212
This container comes with the basic tools you need to get started with Juju and
13-
Charms. It includes [charm-tools](https://github.com/juju/charm-tools) to
13+
Charms. It includes [charm-tools](https://github.com/juju/charm-tools) to
1414
build charms and [bundletester](https://github.com/juju-solutions/bundletester)
1515
to test charms.
1616

1717
This container is built on top of the
1818
[jujubox](https://github.com/juju-solutions/jujubox) container, adding tools
19-
and functionality. Refer to the jujubox project for more information about the
19+
and functionality. Refer to the jujubox project for more information about the
2020
options to run that container and the volumes available.
2121

2222
To use this container you need to install Docker, download charmbox, and run
23-
charmbox.
23+
charmbox.
2424

25-
# Install Docker
25+
## Install Docker
26+
27+
### Linux
2628

27-
## Linux
2829
Install Docker using the package manager for your Linux distribution, or
2930
[get.docker.com](https://get.docker.com/). We recommend Docker version 1.6 or
3031
greater.
3132

32-
## Mac OS X
33+
### Mac OS X
3334

3435
There are several ways to
35-
[install Docker on Mac OS X](https://docs.docker.com/engine/installation/mac/).
36+
[install Docker on Mac OS X](https://docs.docker.com/engine/installation/mac/).
3637
Consult the latest documentation on
3738
[Getting Started with Docker for Mac](https://docs.docker.com/docker-for-mac/).
3839

39-
# Download charmbox
40+
## Download charmbox
4041

4142
The easiest way to use charmbox is to simply pull the container from the
4243
[Docker hub](https://registry.hub.docker.com/u/jujusolutions/charmbox/).
4344

44-
```
45+
```bash
4546
docker pull jujusolutions/charmbox
4647
```
4748

48-
If you want to see the code you can download the charmbox project from
49+
If you want to see the code you can download the charmbox project from
4950
[github](https://github.com/juju-solutions/charmbox) and build it from source.
5051

51-
```
52+
```bash
5253
git clone https://github.com/juju-solutions/charmbox.git && cd charmbox
5354
docker build -t jujusolutions/charmbox ./
5455
```
5556

56-
# Run charmbox
57+
## Run charmbox
5758

58-
There are several different ways to run charmbox depending on what you are
59-
trying to accomplish.
59+
There are several different ways to run charmbox depending on what you are
60+
trying to accomplish.
6061

61-
## Running charmbox to build Charms
62+
### Build Charms
6263

6364
The main use case for charm box is to build charms from layers and interfaces.
6465
By using charmbox you do not need to install and configure the tools.
6566

66-
As with jujubox you should volume mount (-v) `$JUJU_DATA` directory from the
67-
host to the charmbox container so you preserve the Juju information between
67+
As with jujubox you should volume mount (-v) `$JUJU_DATA` directory from the
68+
host to the charmbox container so you preserve the Juju information between
6869
runs. The output from a charm build will be in `/home/ubuntu/charms/` so mount
69-
the `$JUJU_REPOSITORY` directory to preserve the built artifacts. To have
70-
access to the layers and interfaces, mount the `$LAYER_PATH` and
71-
`$INTERFACE_PATH` from the host to the charmbox container. Remember the
70+
the `$JUJU_REPOSITORY` directory to preserve the built artifacts. To have
71+
access to the layers and interfaces, mount the `$CHARM_LAYERS_DIR` and
72+
`$CHARM_INTERFACES_DIR` from the host to the charmbox container. Remember the
7273
charmbox file system is reset after you exit the container.
7374

74-
```
75+
```bash
7576
docker run --rm -it \
7677
-v $JUJU_DATA:/home/ubuntu/.local/share/juju \
7778
-v $JUJU_REPOSITORY:/home/ubuntu/charms \
78-
-v $LAYER_PATH:/home/ubuntu/charms/layers \
79-
-v $INTERFACE_PATH:/home/ubuntu/charms/interfaces \
79+
-v $CHARM_LAYERS_DIR:/home/ubuntu/charms/layers \
80+
-v $CHARM_INTERFACES_DIR:/home/ubuntu/charms/interfaces \
8081
jujusolutions/charmbox
8182
```
8283

83-
## Running charmbox to test Charms
84+
### Test Charms
8485

8586
Another use case for charmbox is to use the test tools included. In this case
8687
you may need to mount the charm or bundle directory and run the `bundletester`
8788
tool. You can map the current workign directory into charmbox for testing
8889
a bundle or charm.
8990

90-
```
91+
```bash
9192
docker run --rm -it \
9293
-v $JUJU_DATA:/home/ubuntu/.local/share/juju \
9394
-v $JUJU_REPOSITORY:/home/ubuntu/charms \
9495
-v $PWD:/home/ubuntu/pwd \
9596
jujusolutions/charmbox
9697
```
9798

98-
See the Environment Variables
99-
[reference](https://jujucharms.com/docs/2.0/reference-environment-variables)
100-
for more details on `$JUJU_DATA`, `$JUJU_REPOSITORY`, `$LAYER_PATH` and
101-
`$INTERFACE_PATH` .
99+
See the Environment Variables
100+
[reference](https://docs.jujucharms.com/juju-environment-variables)
101+
for more details on `$JUJU_DATA`, `$JUJU_REPOSITORY`, `$CHARM_LAYERS_DIR` and
102+
`$CHARM_INTERFACES_DIR`.
102103

103104
## charmbox and the LXD provider
104105

105-
At this time you can not run charmbox on the LXD provider inside of Docker
106-
because of some nested container issues. If you want to use the LXD provider
106+
At this time you can not run charmbox with the LXD provider inside of Docker
107+
because of some nested container issues. If you want to use the LXD provider,
107108
install Juju and LXD on the host system.
108109

109-
# More information
110+
## More information
110111

111-
For more information about what you can do in charmbox check out the
112-
[Juju documenation](https://jujucharms.com/docs).
112+
For more information about what you can do in charmbox check out the
113+
[Juju documenation](https://docs.jujucharms.com/).
113114

114-
If you find any bugs please create an issue in the
115-
[jujubox github repository](https://github.com/juju-solutions/charmbox/issues).
115+
If you find any bugs please create an issue in the
116+
[charmbox github repository](https://github.com/juju-solutions/charmbox/issues).

‎charmbox-setup.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ sudo pip3 install amulet
3131
# Install charm-tools from source
3232
git clone https://github.com/juju/charm-tools /tmp/charm-tools
3333
cd /tmp/charm-tools
34-
sudo pip2 install .
34+
sudo pip3 install .
3535
cd ..
3636
rm -rf charm-tools
3737
git clone https://github.com/juju-solutions/matrix.git

0 commit comments

Comments
 (0)
This repository has been archived.