Skip to content

Instantly share code, notes, and snippets.

View grdnrio's full-sized avatar

Joe Gardiner grdnrio

View GitHub Profile
@grdnrio
grdnrio / lighthouse.yaml
Created March 17, 2020 16:59
Lighthouse yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: px-lh-account
namespace: kube-system
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: px-lh-role
@grdnrio
grdnrio / wordpress.yaml
Last active March 17, 2020 12:38
Wordpress Example
apiVersion: storage.k8s.io/v1beta1
kind: StorageClass
metadata:
name: portworx-sc-repl3-shared
provisioner: kubernetes.io/portworx-volume
parameters:
repl: "2"
shared: "true"
allowVolumeExpansion: true
---
@grdnrio
grdnrio / postgres.yaml
Created March 17, 2020 12:15
Postgres Deployment Example
kind: StorageClass
apiVersion: storage.k8s.io/v1beta1
metadata:
name: px-postgres-sc
provisioner: kubernetes.io/portworx-volume
parameters:
repl: "3"
io_profile: "db"
priority_io: "high"
allowVolumeExpansion: true
PWX logs here:
```
[core@ip-10-0-128-157 ~]$ journalctl -lfu portworx*
-- Logs begin at Mon 2019-07-15 13:34:18 UTC. --
Jul 15 14:28:07 ip-10-0-128-157 portworx[71845]: Tracefile cleanup: Tracing disabled, remove all previous traces...
Jul 15 14:28:07 ip-10-0-128-157 portworx[71845]: 2019-07-15 14:28:07,617 INFO success: cache_flush entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
Jul 15 14:28:07 ip-10-0-128-157 portworx[71845]: 2019-07-15 14:28:07,620 INFO exited: cache_flush (exit status 0; expected)
Jul 15 14:28:07 ip-10-0-128-157 portworx[71845]: Clean out lttng tmpfs location: ...
Jul 15 14:28:07 ip-10-0-128-157 portworx[71845]: time="2019-07-15T14:28:07Z" level=info msg="px-ns Starting.."
@grdnrio
grdnrio / postgres.yaml
Created July 11, 2019 08:13
Postgres Deployment
kind: StorageClass
apiVersion: storage.k8s.io/v1beta1
metadata:
name: px-postgres-sc
provisioner: kubernetes.io/portworx-volume
parameters:
repl: "3"
io_profile: "db"
priority_io: "high"
---
@grdnrio
grdnrio / root_block_device_debug
Created June 25, 2019 13:22
An argument named "root_block_device" is not expected here. Did you mean to define a block of type "root_block_device"? - debug
2019/06/25 15:20:49 [INFO] Terraform version: 0.12.3
2019/06/25 15:20:49 [INFO] Go runtime version: go1.12.4
2019/06/25 15:20:49 [INFO] CLI args: []string{"/usr/local/bin/terraform", "apply", "--auto-approve"}
2019/06/25 15:20:49 [DEBUG] Attempting to open CLI config file: /Users/joe/.terraformrc
2019/06/25 15:20:49 Loading CLI configuration from /Users/joe/.terraformrc
2019/06/25 15:20:49 [INFO] CLI command args: []string{"apply", "--auto-approve"}
2019/06/25 15:20:49 [DEBUG] New state was assigned lineage "3f7e1dbd-3113-6477-b531-4f806800be8a"
2019/06/25 15:20:49 [DEBUG] checking for provider in "."
2019/06/25 15:20:49 [DEBUG] checking for provider in "/usr/local/bin"
2019/06/25 15:20:49 [DEBUG] checking for provider in ".terraform/plugins/darwin_amd64"
@grdnrio
grdnrio / existing-vpc.tf
Created March 23, 2019 21:14
Example hardcoding an existing VPC
# Create a subnet to launch our instances into
resource "aws_subnet" "default" {
vpc_id = "<EXISTING VPC ID HERE>"
cidr_block = "10.0.1.0/24"
map_public_ip_on_launch = true
}
# Our default security group to access
# the instances over SSH and HTTP
resource "aws_security_group" "default" {
@grdnrio
grdnrio / manifests-all.yaml
Last active February 11, 2019 19:25
Prometheus + Grafana for Demo
# Derived from ./manifests
---
apiVersion: v1
kind: Namespace
metadata:
name: kube-system
---
apiVersion: v1
data:
default.tmpl: |
@grdnrio
grdnrio / postgres-deploy.yaml
Created February 7, 2019 09:20
Postgres Stack File Swarm
# Run psql after exec-ing to container
version: '3.1'
services:
db:
image: postgres:9.5
volumes:
- pg-data:/var/lib/postgresql/data
environment:
POSTGRES_USER: pgbench
@grdnrio
grdnrio / postgres.yaml
Last active December 3, 2018 19:40
Postgres All In One
kind: StorageClass
apiVersion: storage.k8s.io/v1beta1
metadata:
name: px-postgres-sc
provisioner: kubernetes.io/portworx-volume
parameters:
repl: "3"
io_profile: "db"
priority_io: "high"
---