lxc launch ubuntu:16.04 charm-snap -c security.nesting=true -c security.privileged=true
lxc exec charm-snap -- apt update
lxc exec charm-snap -- apt install -y squashfuse
# Restart required to avoid 'Setup snap "core" (3748) security profiles (cannot setup udev for snap "core": cannot reload udev rules: exit status 2'
lxc restart charm-snap
lxc exec charm-snap -- snap install charm
lxc exec charm-snap -- sh -c "rm -rf charms/layers; mkdir -p charms/layers; cd charms/layers; charm create simple; cd simple; charm build"
INFO: Using default charm template (reactive-python). To select a different template, use the -t option.
This document is intended to aid the development workflow described in Developer HowTo for UI Module for Open Source Mano.
In order to develop in your preferred IDE/text editor, you can "bind mount" a directory from your local computer into an LXD container running on the same host.
First, find out your uid:
$ id
id
uid=1000(stone) gid=1000(stone) groups=1000(stone),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),113(lpadmin),128(sambashare),129(lxd),131(kismet),138(libvirtd)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Huge pages 1G auto mount | |
mkdir -p /mnt/huge | |
if ! grep -q "Huge pages" /etc/fstab | |
then | |
echo "" >> /etc/fstab | |
echo "# Huge pages" >> /etc/fstab | |
echo "nodev /mnt/huge hugetlbfs pagesize=1GB 0 0" >> /etc/fstab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
series: xenial | |
services: | |
mariadb: | |
charm: "cs:trusty/mariadb-3" | |
num_units: 1 | |
annotations: | |
"gui-x": "539" | |
"gui-y": "494.7050807568877" | |
to: | |
- "0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2015-05-22 03:39:36 INFO juju.cmd supercommand.go:37 running jujud [1.24-beta3.1-trusty-amd64 gc] | |
2015-05-22 03:39:36 DEBUG juju.agent agent.go:425 read agent config, format "1.18" | |
2015-05-22 03:39:36 INFO juju.cmd.jujud machine.go:384 machine agent machine-0 start (1.24-beta3.1-trusty-amd64 [gc]) | |
2015-05-22 03:39:36 DEBUG juju.wrench wrench.go:112 couldn't read wrench directory: stat /var/lib/juju/wrench: no such file or directory | |
2015-05-22 03:39:36 INFO juju.cmd.jujud upgrade.go:87 no upgrade steps required or upgrade steps for 1.24-beta3.1 have already been run. | |
2015-05-22 03:39:36 INFO juju.network network.go:194 setting prefer-ipv6 to false | |
2015-05-22 03:39:36 INFO juju.worker runner.go:261 start "api" | |
2015-05-22 03:39:36 INFO juju.worker runner.go:261 start "statestarter" | |
2015-05-22 03:39:36 INFO juju.api apiclient.go:331 dialing "wss://localhost:17070/environment/8bfca804-7bb2-48c7-8316-a355046f7546/api" | |
2015-05-22 03:39:36 INFO juju.worker runner.go:261 start "termination" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ juju status | |
environment: local | |
machines: | |
"0": | |
agent-state: started | |
agent-version: 1.24-beta3.1 | |
dns-name: localhost | |
instance-id: localhost | |
series: trusty | |
state-server-member-status: has-vote |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ juju status --debug | |
2015-05-22 03:52:09 INFO juju.cmd supercommand.go:37 running juju [1.24-beta4-trusty-amd64 gc] | |
2015-05-22 03:52:09 DEBUG juju.api api.go:168 trying cached API connection settings - endpoints [localhost:17070 10.0.2.15:17070 10.0.3.1:17070 172.16.250.15:17070] | |
2015-05-22 03:52:09 INFO juju.api api.go:280 connecting to API addresses: [localhost:17070 10.0.2.15:17070 10.0.3.1:17070 172.16.250.15:17070] | |
2015-05-22 03:52:09 INFO juju.api apiclient.go:331 dialing "wss://localhost:17070/environment/8bfca804-7bb2-48c7-8316-a355046f7546/api" | |
2015-05-22 03:52:09 DEBUG juju.api apiclient.go:337 error dialing "wss://localhost:17070/environment/8bfca804-7bb2-48c7-8316-a355046f7546/api", will retry: websocket.Dial wss://localhost:17070/environment/8bfca804-7bb2-48c7-8316-a355046f7546/api: dial tcp 127.0.0.1:17070: connection refused | |
2015-05-22 03:52:11 INFO juju.api apiclient.go:331 dialing "wss://localhost:17070/environment/8bfca804-7bb2-48c7-8316-a355046f7546/api" | |
2015-05-22 03:52:11 DEBUG juju.api |