Skip to content

Instantly share code, notes, and snippets.

View AdamIsrael's full-sized avatar

Adam Israel AdamIsrael

View GitHub Profile
@AdamIsrael
AdamIsrael / recipe.json
Created February 12, 2023 20:12
vanilla first-setup receipe
{
"log_file": "/etc/ublue/first-setup.log",
"distro_name": "uBlue OS",
"distro_logo": "org.vanillaos.FirstSetup",
"pre_run": [],
"post_run": [],
"tour": {
"get-involved": {
"icon": "system-users-symbolic",
"title": "Get Involved",
@AdamIsrael
AdamIsrael / recipe.json
Last active February 6, 2023 00:01
first-setup recipe for ublue
{
"log_file": "/etc/ublue/first-setup.log",
"distro_name": "uBlue OS",
"distro_logo": "org.vanillaos.FirstSetup",
"pre_run": [],
"post_run": [],
"tour": {
"get-involved": {
"icon": "system-users-symbolic",
"title": "Get Involved",
@AdamIsrael
AdamIsrael / log.txt
Created November 21, 2018 19:57
OSM R5 Install backtrace
multipass@big-bowerbird:~$ wget https://osm-download.etsi.org/ftp/osm-5.0-five/install_osm.sh
--2018-11-21 14:51:57-- https://osm-download.etsi.org/ftp/osm-5.0-five/install_osm.sh
Resolving osm-download.etsi.org (osm-download.etsi.org)... 195.238.226.47
Connecting to osm-download.etsi.org (osm-download.etsi.org)|195.238.226.47|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 858 [text/x-sh]
Saving to: ‘install_osm.sh’
install_osm.sh 100%[===================================================================================================================================================================>] 858 --.-KB/s in 0s
@AdamIsrael
AdamIsrael / README.md
Last active May 20, 2019 02:44
Installing Juju 2.0 on Centos7

Juju 2.0 on Centos7

Configure epel repository

yum -y install epel-release
yum repolist

Install LXD

@AdamIsrael
AdamIsrael / test_config_changed.py
Created September 28, 2018 02:26
Example reactive charm to test register_trigger
from charms.reactive import when, when_not, set_flag
from charmhelpers.core.hookenv import log, config
from charms.reactive.flags import register_trigger
# Register a trigger so that we can respond to config.changed, even if
# it's being cleared by another handler
register_trigger(when='config.changed',
set_flag='trigger.config')
@AdamIsrael
AdamIsrael / gist:7ead3157593f87b98de9
Created March 25, 2015 00:49
Generate yaml for haproxy charm
#!/usr/bin/env python
import json
service = [
{
'service_name': 'demo',
'service_options': ['mode http', 'balance leastconn', 'option httpchk GET / HTTP/1.0'],
'server_options': ['maxconn 100'],
'servers': [
[
@AdamIsrael
AdamIsrael / ingest_charm.py
Last active April 17, 2019 21:14
Ingest a charm into gitlab and perform some common review queue steps
#!/usr/bin/env python
"""
Setup notes:
Git needs to be configured on the machine doing the ingestion.
git config --global user.name "Administrator"
git config --global user.email "admin@example.com"
In Gitlab:
juju-log: Connecting to controller... ws://10.182.5.117:17070 as admin/admin
Traceback (most recent call last):
File "test_controller.py", line 253, in <module>
main()
File "test_controller.py", line 246, in main
if ns.login():
File "test_controller.py", line 122, in login
self.client = self.loop.run_until_complete(self.connect())
File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
return future.result()
@AdamIsrael
AdamIsrael / README.md
Last active June 7, 2018 19:16
pylxd testing

An example of connecting to your local LXD daemon.

@AdamIsrael
AdamIsrael / update-juju-lxd-image.sh
Last active June 5, 2018 17:35
Pre-cache the LXD image used when launching Juju machines
#!/bin/bash
#
# This script will create xenial (and trusty, et al) lxd images that will
# be used by the lxd provider in juju 2.1+ It is for use with the lxd
# provider for local development and preinstalls a common set of production
# packages.
#
# This is important, as between them, basenode and layer-basic install ~111
# packages, before we even get to any packages installed by your charm.
#