# remove php5 modules
apt-get autoremove --purge php5-*
# add php-7.0 source list by [Ondřej Surý](https://github.com/oerdnj)
add-apt-repository ppa:ondrej/php
# Update index
apt-get update
# Install php7.0-fpm with needed extensions
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
# Generic core logic outline for all-encompassing ssl/tls layer | |
# user specified crt/key should get highest priority | |
# if you set 'key' and 'crt', they will be used above all else | |
if config('crt') and config('key'): | |
write_out_user_cert_key() | |
# config('use-le') will default to False, so if | |
# the user wants it, they can set this to get it | |
# alongside not specifying a key/crt |
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 | |
set -e | |
# Export variables needed to build charms | |
echo "export CHARM_ROOT=$HOME/allcode/charms” >> ~/.bashrc | |
echo "export LAYER_PATH=$CHARM_ROOT/layers” >> ~/.bashrc 12:31 | |
echo "export INTERFACE_PATH=$CHARM_ROOT/interfaces” >> ~/.bashrc | |
echo "export JUJU_REPOSITORY=$CHARM_ROOT/repo” >> ~/.bashrc 12:32 | |
source ~/.bashrc |
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 | |
machines: | |
0: | |
series: xenial | |
constraints: "spaces=barbican" | |
1: | |
series: xenial | |
constraints: "spaces=barbican" | |
2: | |
series: xenial |
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
#cloud-config | |
output: | |
all: "|tee -a /tmp/cloud.out" | |
bootcmd: | |
- curl -sL https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add - | |
apt_sources: | |
- source: "deb https://artifacts.elastic.co/packages/5.x/apt stable main" | |
packages: | |
- elasticsearch | |
runcmd: |
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
#!/usr/bin/env python3 | |
import sys | |
import asyncio | |
import aiohttp | |
from juju.model import Model | |
username = sys.argv[1] | |
password = sys.argv[2] |
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
#!/usr/bin/env python3 | |
import asyncio | |
import functools | |
import logging | |
import signal | |
import sys | |
from concurrent.futures import CancelledError | |
from juju.model import Model |
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
#!/usr/bin/env python3 | |
import functools | |
import sys | |
import signal | |
import asyncio | |
import aiohttp | |
import logging | |
from juju.model import Model |
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
#!/usr/bin/env python3.5 | |
# This code runs a custom action called update-app | |
# on all units of app-web and app-worker applications | |
# Must have the following environment vars available | |
# - JUJU_USER | |
# - JUJU_PASSWORD | |
# - CONTROLLER_ENDPOINT | |
# - MODEL_UUID | |
# - GIT_COMMIT |
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 | |
# ~/.bashrc or ~/.profile | |
function show_juju_env { | |
local currentEnv | |
currentEnv=`~/.juju_context.py` | |
printf "%s" "$currentEnv" | |
} | |
export PS1="[\[\e[38;5;70m\]\$(show_juju_env)\[\e[0m\]] ${PS1}"; |