Skip to content

Instantly share code, notes, and snippets.

View welshstew's full-sized avatar
😎
henlo world

Stuart Winchester welshstew

😎
henlo world
View GitHub Profile
@welshstew
welshstew / link-pull-secret.sh
Last active December 3, 2020 13:18
Some supporting YAML for a presentation
@welshstew
welshstew / app.js
Created November 11, 2020 12:15
app.js
/* src/App.js */
import React, { useEffect, useState } from 'react'
import Amplify, { API, graphqlOperation } from 'aws-amplify'
import { createTodo } from './graphql/mutations'
import { listTodos } from './graphql/queries'
import awsExports from "./aws-exports";
Amplify.configure(awsExports);
const initialState = { name: '', description: '' }
@welshstew
welshstew / appspec.yaml
Created October 8, 2020 14:50
BlueGreen fargate json files for ECS and CodeDeploy
version: 0.0
Resources:
- TargetService:
Type: AWS::ECS::Service
Properties:
TaskDefinition: "arn:aws:ecs:eu-west-2:1234:task-definition/first-run-task-definition:1"
LoadBalancerInfo:
ContainerName: "sample-app"
ContainerPort: 80
PlatformVersion: "LATEST"
@welshstew
welshstew / argocd.yml
Last active September 22, 2020 08:42
argocd custom dpeloy with openshift oauth
apiVersion: argoproj.io/v1alpha1
kind: ArgoCD
metadata:
namespace: argocd
name: argocd
spec:
server:
route:
enabled: true
rbac:
oc get dc,svc,is -o json | jq '. | del(.metadata.id, .status, .someotherfieldyouwanttodelete)' | xargs oc create -f - -n mynewnamespace`
@welshstew
welshstew / my-prom-resources.yaml
Last active September 1, 2020 21:14
simple helm chart deployment of a prometheus server
---
# Source: prometheus/templates/server-configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
labels:
component: "my-prometheus"
app: prometheus
release: my-prometheus
chart: prometheus-11.4.0
@welshstew
welshstew / fbench-job.yml
Last active August 13, 2020 10:08
fbench disk test job
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: fbench-pv-claim
spec:
storageClassName: thin
accessModes:
- ReadWriteOnce
resources:
requests:
@welshstew
welshstew / eap-64-dockerfile
Last active May 20, 2020 09:46
EAP Dockerfiles
# Copyright 2019 Red Hat
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@welshstew
welshstew / aurora_cluster.tf
Created April 6, 2020 16:11 — forked from hartzell/aurora_cluster.tf
Creates a AWS RDS Aurora Cluster with Terraform
########################
## Variables
########################
variable "environment_name" {
description = "The name of the environment"
}
variable "vpc_id" {
@welshstew
welshstew / spring-boot-camel-mirror-template.yml
Last active February 21, 2020 15:30
spring-boot-camel-mirror-template
apiVersion: template.openshift.io/v1
kind: Template
labels:
template: s2i-camel-app
metadata:
annotations:
description: Spring Boot and Camel QuickStart. This example demonstrates how you
can use Apache Camel with Spring Boot on OpenShift. The quickstart uses Spring
Boot to configure an application which includes a Camel route that triggers
a message every 5th second, and routes the message to a log.