Skip to content

Instantly share code, notes, and snippets.

View aric49's full-sized avatar
:atom:
Blazing Trails!

Aric Renzo aric49

:atom:
Blazing Trails!
  • Charlotte, NC
View GitHub Profile
@aric49
aric49 / !readme.md
Created March 21, 2018 19:42 — forked from dougbtv/!readme.md
You had ONE JOB -- A Kubernetes job.

You had ONE JOB -- A Kubernetes job.

Let's take a look at how Kubernetes jobs are crafted. I had been jamming some kind of work-around shell scripts in the entrypoint* for some containers in the vnf-asterisk project that Leif and I have been working on. And that's not perfect when we can use Kubernetes jobs, or in their new parlance, "run to completion finite workloads" (I'll stick to calling them "jobs"). They're one-shot containers that do one thing, and then end (sort of like a "oneshot" of systemd units, at least how we'll use them today). I like the idea of using them to complete some service discovery for me when other pods are coming up. Today we'll fire up a pod, and spin up a job to discover that pod (by querying the API for info about it), and put info into etcd. Let's get the job done.

This post also exists as a [gist on github](https

@aric49
aric49 / cleaninstance.txt
Created March 22, 2018 18:03
AnsibleContainer - Clean EC2 Instance
ubuntu@ip-172-17-23-83:~$ sudo apt-get install docker.io python-pip
sudo: unable to resolve host ip-172-17-23-83: Connection timed out
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
binutils bridge-utils build-essential cgroupfs-mount containerd cpp cpp-5 dpkg-dev fakeroot g++ g++-5 gcc gcc-5 gcc-5-base libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl
libasan2 libatomic1 libc-dev-bin libc6-dev libcc1-0 libcilkrts5 libdpkg-perl libexpat1-dev libfakeroot libfile-fcntllock-perl libgcc-5-dev libgomp1 libisl15 libitm1 liblsan0 libmpc3 libmpx0
libpython-all-dev libpython-dev libpython-stdlib libpython2.7 libpython2.7-dev libpython2.7-minimal libpython2.7-stdlib libquadmath0 libstdc++-5-dev libstdc++6 libtsan0 libubsan0 linux-libc-dev make
manpages-dev python python-all python-all-dev python-dev python-minimal python-pip-whl python-pkg-resources python-setuptools python-wheel python2.7 pytho
@aric49
aric49 / config.cson
Last active April 18, 2018 18:18
Atom.IO Configuration
#CTRL-SHIFT-P "Config" in fuzzy finder.
"*":
"autocomplete-plus":
confirmCompletion: "tab always, enter when suggestion explicitly selected"
core:
telemetryConsent: "limited"
themes: [
"one-dark-ui"
"solarized-dark-syntax"
]
@aric49
aric49 / deployment.yaml
Last active June 7, 2018 13:13
Kube-ConfigMap
#Truncated Configuration
spec:
- name: php-configs
configMap:
name: php-configs
items:
- key: api.yml
path: api.yml
- key: blogconfig.php
path: blogconfig.php
@aric49
aric49 / docker-compose.yml
Created June 11, 2018 17:28
docker-compose cache_from
myproject-web-php:
build:
context: .
cache_from:
- myproject_myproject-web-php:latest #OR do I use: myproject-web-php:latest ?
dockerfile: Dockerfile
args:
BUILD_ENVIRONMENT: local
container_name: ${CONTAINER_PREFIX}.php
volumes:
@aric49
aric49 / Dockerfile
Last active June 12, 2018 14:10
Docker Environments
#Specify Environment BuildArgs - build by default for CICD
ARG BUILD_ENVIRONMENT=build #This is the default value if the arg isn't overridden. will copy config/config-build/* by default.
ENV BUILD_ENVIRONMENT=$BUILD_ENVIRONMENT
COPY config/config-${BUILD_ENVIRONMENT}/ /var/www/app/config/
@aric49
aric49 / nouveau.log
Created July 16, 2018 19:01
Nouveau Logs
10:59:43 kernel: nouveau 0000:01:00.0: gnome-shell[2380]: channel 15 killed!
10:59:43 kernel: nouveau 0000:01:00.0: gnome-shell[2380]: channel 15 killed!
10:59:43 kernel: nouveau 0000:01:00.0: fifo: engine 0: scheduled for recovery
10:59:43 kernel: nouveau 0000:01:00.0: fifo: engine 5: scheduled for recovery
10:59:43 kernel: nouveau 0000:01:00.0: fifo: channel 15: killed
10:59:43 kernel: nouveau 0000:01:00.0: fifo: runlist 0: scheduled for recovery
10:59:43 kernel: nouveau 0000:01:00.0: fifo: SCHED_ERROR 0a [CTXSW_TIMEOUT]
10:48:31 kernel: pci_bus 0000:06: busn_res: [bus 06-3d] is released
10:48:31 kernel: pcieport 0000:06:00.0: Refused to change power state, currently in D3
10:48:27 kernel: pci_bus 0000:06: Allocating resources
@aric49
aric49 / nouveau2.log
Created July 16, 2018 19:05
Nouveau Log 2
10:26:43 kernel: nouveau 0000:01:00.0: gnome-shell[2169]: channel 15 killed!
10:26:43 kernel: nouveau 0000:01:00.0: gnome-shell[2169]: channel 15 killed!
10:26:43 kernel: nouveau 0000:01:00.0: fifo: engine 5: scheduled for recovery
10:26:43 kernel: nouveau 0000:01:00.0: fifo: engine 0: scheduled for recovery
10:26:43 kernel: nouveau 0000:01:00.0: fifo: runlist 0: scheduled for recovery
10:26:43 kernel: nouveau 0000:01:00.0: fifo: channel 15: killed
10:26:43 kernel: nouveau 0000:01:00.0: fifo: read fault at 110a729000 engine 00 [GR] client 05 [GPC0/PE_1] reason 00 [PDE] on channel 15 [00fdf1e000 gnome-shell[2169]]
10:00:46 kernel: nouveau 0000:01:00.0: disp: 0x000064a8[0]: INIT_GENERIC_CONDITON: unknown 0x07
10:00:46 kernel: nouveau 0000:01:00.0: disp: 0x000064a8[0]: INIT_GENERIC_CONDITON: unknown 0x07
10:00:46 kernel: nouveau 0000:01:00.0: disp: 0x00006671[0]: INIT_GENERIC_CONDITON: unknown 0x07
@aric49
aric49 / docker-compose.yml
Created July 18, 2018 15:12
Docker Compose v2 Reference
---
version: '2'
services:
app:
build:
context: .
ports:
- "5000"
environment:
ASPNETCORE_ENVIRONMENT: development