Skip to content

Instantly share code, notes, and snippets.

View jacopen's full-sized avatar

Kazuto Kusama jacopen

View GitHub Profile
@jacopen
jacopen / flow
Last active December 14, 2016 12:12
HUIS x Node-RED flow
[{"id":"afe06708.1f8058","type":"inject","z":"96ac7095.08f82","name":"bootstrap","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":95.3888931274414,"y":171.99998474121094,"wires":[["d61a4986.befb78"]]},{"id":"d61a4986.befb78","type":"exec","z":"96ac7095.08f82","command":"sudo bto","addpay":true,"append":"","useSpawn":true,"timer":"","name":"command","x":287.5,"y":172.5,"wires":[["feea19ab.818108"],[],["5bc857ef.477168"]]},{"id":"5bc857ef.477168","type":"function","z":"96ac7095.08f82","name":"loop","func":"\nreturn msg;","outputs":1,"noerr":0,"x":289.5,"y":232,"wires":[["d61a4986.befb78"]]},{"id":"feea19ab.818108","type":"switch","z":"96ac7095.08f82","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"C1AA5A8F3023B1","vt":"str"},{"t":"cont","v":"C1AA5A8F3022A1","vt":"str"},{"t":"cont","v":"C1AA5A8F302081","vt":"str"},{"t":"cont","v":"41AA5A8F301C71","vt":"str"},{"t":"cont","v":"C1AA5A8F302191","vt":"str"},{"t":"else"}],"checkall":"true","outputs":6
@jacopen
jacopen / install.sh
Created July 29, 2017 08:30
Rancher handson installer
#!/bin/sh
set -e
sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt install curl wget vim bash-completion
sudo apt-get -y clean
curl -fsSL https://releases.rancher.com/install-docker/17.03.sh | sh
@jacopen
jacopen / collocate.yml
Last active December 19, 2017 11:22
Collocate UAA and API
# Remove api and uaa
- type: remove
path: /instance_groups/name=api
- type: remove
path: /instance_groups/name=uaa
# Almost same as operations/scale-one-az.yml
- type: replace
path: /instance_groups/name=consul/instances
value: 1
@jacopen
jacopen / result.log
Created January 23, 2018 01:30
hello-concourse
dummy
jobs:
- name: hello-world
plan:
- task: say-hello
config:
platform: linux
image_resource:
type: docker-image
source: {repository: ubuntu}
run:
@jacopen
jacopen / concourse-sample.yml
Last active April 20, 2018 01:15
concourse
version: '3'
services:
concourse-db:
image: postgres:9.5
environment:
POSTGRES_DB: concourse
POSTGRES_USER: concourse
POSTGRES_PASSWORD: foobar12345
PGDATA: /database
@jacopen
jacopen / Unattend.xml
Created April 24, 2018 04:23
Windows Stemcell for OpenStack
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="generalize">
<component name="Microsoft-Windows-PnpSysprep" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<PersistAllDeviceInstalls>true</PersistAllDeviceInstalls>
</component>
</settings>
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
<OOBE>
@jacopen
jacopen / install-boshcli.sh
Last active July 17, 2018 14:49
Install tools
#!/bin/bash
curl -Lo ./bosh https://s3.amazonaws.com/bosh-cli-artifacts/bosh-cli-3.0.1-linux-amd64
chmod +x ./bosh
sudo mv ./bosh /usr/local/bin/bosh
bosh -v
@jacopen
jacopen / pipeline.yml
Last active July 20, 2018 09:06
azure-blobstorage-resource
resource_types:
- name: azure-blobstore
type: docker-image
source:
repository: czero/azure-blobstore-resource
resources:
- name: file-4MB
type: azure-blobstore
source:
@jacopen
jacopen / deploy-app.sh
Last active August 1, 2018 10:29
Knative setup
kubectl apply -f service.yaml
# Knative-ingressgatewayの確認
kubectl get svc knative-ingressgateway -n istio-system
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
knative-ingressgateway LoadBalancer 10.63.251.162 35.229.215.43 80:32380/TCP,443:32390/TCP,32400:32400/TCP 3m
export IP_ADDRESS=$(kubectl get node -o 'jsonpath={.items[0].status.addresses[0].address}'):$(kubectl get svc knative-ingressgateway -n istio-system -o 'jsonpath={.spec.ports[?(@.port==80)].nodePort}')