Skip to content

Instantly share code, notes, and snippets.

View CalvinHartwell's full-sized avatar
💭
Delivering Kubernetes!

Calvin Hartwell CalvinHartwell

💭
Delivering Kubernetes!
View GitHub Profile
@CalvinHartwell
CalvinHartwell / gist:63b652c4286195659749588a12a2f39c
Created March 27, 2018 07:36
ceph-osd mlocate package missing issue
unit-ceph-osd-2: 09:32:16 INFO unit.ceph-osd/2.juju-log Installing apparmor profile for ceph-osd
unit-ceph-osd-2: 09:32:17 INFO unit.ceph-osd/2.juju-log Installing apparmor utils.
unit-kubernetes-worker-0: 09:32:17 DEBUG unit.kubernetes-worker/0.update-status Error from server (NotFound): nodes "FROVHWORKERK8SDEV-N04" not found
unit-kubernetes-worker-0: 09:32:17 INFO unit.kubernetes-worker/0.juju-log Failed to apply label juju-application=kubernetes-worker. Will retry.
unit-kubernetes-worker-0: 09:32:18 DEBUG unit.kubernetes-worker/0.update-status Error from server (NotFound): nodes "FROVHWORKERK8SDEV-N04" not found
unit-ceph-osd-2: 09:32:18 INFO unit.ceph-osd/2.juju-log Setting up the apparmor profile for usr.bin.ceph-osd in disable mode.
unit-kubernetes-worker-0: 09:32:18 INFO unit.kubernetes-worker/0.juju-log Failed to apply label juju-application=kubernetes-worker. Will retry.
unit-ceph-osd-2: 09:32:19 DEBUG unit.ceph-osd/2.config-changed Disabling /etc/apparmor.d/usr.bin.ceph-osd.
unit-ceph-osd-2: 09:32:
@CalvinHartwell
CalvinHartwell / azure-juju
Last active March 21, 2018 01:49
azure-juju
# configuring juju for azure
We can first check that juju supports azure through the following command:
```
juju show-cloud azure
```
We can also update the list of clouds juju has available using the following command:
@CalvinHartwell
CalvinHartwell / xmr-miner.sh
Last active March 5, 2018 22:08
xmr-miner-ubuntu
#!/bin/bash
# Ubuntu / Debian
sudo apt install libmicrohttpd-dev libssl-dev cmake build-essential libhwloc-dev -y
git clone https://github.com/CalvinHartwell/xmr-miner.git
mkdir xmr-miner/build
cd xmr-miner/build
cmake .. -DCUDA_ENABLE=OFF -DOpenCL_ENABLE=OFF
make install
cd bin
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC/j0VGW+b9D1ZqP/6yLMsKc2GskVGBYlKsLBNZhof6MjQJzhGOagh9nKg31hvJP0M4hWnAo5DEUBzAa8eJO1Agv5idXpqxWTLJv41XLjoYcdTntoXfc6XEMv9Q4PMW6JYr+DhsCuswITH8Y2fhQdO27nsQNiWE9a/HhZfFdOqrOHMiJvszEtQa+H6umqzSah1+Qo4IZBp8bOF9mwT9sSjvbyae9RFhqAGklIxcop15yEVuXnCkebrs5F/jevksNon+tec/h4wBF/MASzPXH4PGptmVqX0JSUblSH7dLtbIryRtEleFTdABjPGPLTsmhINIu6Lyv0u7OSDCrbumOBPZ calvinh@ubuntu-ws
ime="2018-02-23T00:03:57Z" level=info msg="uploading digitaloceanConfig to machine schema"
time="2018-02-23T00:03:57Z" level=info msg="Creating machine driver softlayer"
time="2018-02-23T00:03:57Z" level=info msg="Creating machine driver vmwarevcloudair"
time="2018-02-23T00:03:57Z" level=info msg="Download https://obs.otc.t-systems.com/dockermachinedriver/docker-machine-driver-otc"
time="2018-02-23T00:03:57Z" level=info msg="uploading digitaloceanConfig to machine schema"
time="2018-02-23T00:03:57Z" level=info msg="Creating machine driver vmwarevsphere"
time="2018-02-23T00:03:57Z" level=info msg="uploading azureConfig to machine schema"
time="2018-02-23T00:03:57Z" level=info msg="uploading azureConfig to machine schema"
time="2018-02-23T00:03:57Z" level=info msg="Download https://github.com/packethost/docker-machine-driver-packet/releases/download/v0.1.2/docker-machine-driver-packet_linux-amd64.zip"
time="2018-02-23T00:03:57Z" level=info msg="uploading vmwarevsphereConfig to machine schema"
calvinh@ubuntu-ws:~/Source/geth/go-ethereum/build/bin$ kubectl exec -it rancher-6d45d9d655-4b9fn /bin/bash
root@rancher-6d45d9d655-4b9fn:/var/lib/rancher#
root@rancher-6d45d9d655-4b9fn:/var/lib/rancher#
root@rancher-6d45d9d655-4b9fn:/var/lib/rancher#
root@rancher-6d45d9d655-4b9fn:/var/lib/rancher# kubectl describe projects --all-namespaces --server=localhost:8081
The connection to the server localhost:8081 was refused - did you specify the right host or port?
root@rancher-6d45d9d655-4b9fn:/var/lib/rancher# kubectl describe projects --all-namespaces
1 generic_controller.go:191] NodeController ip-172-31-24-113 [nodesEndpointsController] failed with : Operation cannot be fulfilled on nodes "ip-172-31-24-113": the object has been modified; please apply your changes to the latest version and try again
E0211 23:16:59.590559 1 generic_controller.go:191] ClusterController local [cluster-stats] failed with : Operation cannot be fulfilled on clusters.management.cattle.io "local": the object has been modified; please apply your changes to the latest version and try again
E0211 23:16:59.643101 1 generic_controller.go:191] ClusterController local [cluster-stats] failed with : Operation cannot be fulfilled on clusters.management.cattle.io "local": the object has been modified; please apply your changes to the latest version and try again
...[omitted]...
E0211 23:18:39.937192 1 streamwatcher.go:109] Unable to decode an event from the watch stream: stream error: stream ID 139; INTERNAL_ERROR
E0211 23:18:39.937192 1 streamwatcher.go:109] Un
@CalvinHartwell
CalvinHartwell / cdk-helm.md
Last active February 9, 2018 10:37
Running Helm with Canonical Kubernetes (CDK) or another existing Kubernetes Cluster

Helm on Canonical's Distribution of Kubernetes (CDK)

... WIP

@CalvinHartwell
CalvinHartwell / cdk-rancher.md
Last active February 8, 2018 13:48
Running Rancher with Canonical Kubernetes (CDK) or another existing Kubernetes Cluster

Rancher on Canonical's Distribution of Kubernetes (CDK)

This document describes how to deploy Rancher and import an existing Kubernetes cluster. In our case, we assume you have already deployed CDK, Canonical's Kubernetes Distribution Running on Ubuntu. This can be on AWS, VMware, OpenStack, Azure or on bare metal.

If you run into issues or need support please comment on this Gist and email calvin.hartwell@canonical.com.

Install and deploy Canonical Kubernetes using Juju

@CalvinHartwell
CalvinHartwell / rancher.yaml
Last active February 8, 2018 13:50
cdk-rancher.yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
labels:
app: rancher
name: rancher
spec:
replicas: 1
selector: