Skip to content

Instantly share code, notes, and snippets.

View inductor's full-sized avatar
🐳
Dockerizing

Kohei Ota (inductor) inductor

🐳
Dockerizing
View GitHub Profile
@inductor
inductor / Dockerfile
Last active May 12, 2019 01:46
Dockerfile
FROM node:10.15.3 as builder
WORKDIR /src
COPY . .
RUN yarn install \
--prefer-offline \
--frozen-lockfile \
--non-interactive \
@inductor
inductor / Dockerfile
Last active May 12, 2019 02:27
Secert
FROM alpine:latest
COPY id_ssh_rsa id_ssh_rsa
RUN apk --update --no-cache add git
RUN git -c core.sshCommand="ssh -i ./id_ssh_rsa -F /dev/null" clone git@github.com:hoge/fuga.git
RUN rm -f id_ssh_rsa
# 最後に消してもDockerイメージのレイヤーには残ってしまうので意味がない
@inductor
inductor / docker-compose.yaml
Created July 28, 2019 04:19
docker-compose.yaml
version: "3.7"
services:
laravel:
image: php:7.2-apache
ports:
- "80:80"
volumes:
- /var/www/html:/var/www/html
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: api-ingress
annotations:
kubernetes.io/ingress.allow-http: "false" # 80番をGCLBでExposeするかどうかの設定。内部的なAPIサーバーなのでOFFにしている。
kubernetes.io/ingress.global-static-ip-name: "api-ip" # GCP上でStatic IPを取得しておくとここで呼べる
ingress.gcp.kubernetes.io/pre-shared-cert: "api-cert" # GCLBにセットしたい証明書をここに突っ込める。現状だとgcloudコマンドとかTerraform使ってGCP BetaのAPIで作成可
spec:
backend:
@inductor
inductor / nodegroup-old.yaml
Created December 3, 2019 03:08
昔のノードグループ
---
AWSTemplateFormatVersion: '2010-09-09'
Description: 'EKS nodes'
Resources:
EgressInterCluster:
Type: AWS::EC2::SecurityGroupEgress
Properties:
Description: Allow control plane to communicate with worker nodes in group ng-1
(kubelet and workload TCP ports)
DestinationSecurityGroupId:
@inductor
inductor / nodegroup.yaml
Created December 3, 2019 02:13
簡単になったEKSのマネージドワーカーノード
---
AWSTemplateFormatVersion: '2010-09-09'
Description: 'EKS Managed Nodes'
Resources:
ManagedNodeGroup:
Type: AWS::EKS::Nodegroup
Properties:
ClusterName: cluster1
NodegroupName: worker1
ScalingConfig:
@inductor
inductor / gist:d80759463d99db3a7ae1dea4ecd7ed5f
Created December 4, 2019 08:15
EKS for Fargate on virginia region
/ # dmesg
[ 0.000000] Linux version 4.14.152-127.182.amzn2.x86_64 (mockbuild@ip-10-0-1-129) (gcc version 7.3.1 20180712 (Red Hat 7.3.1-6) (GCC)) #1 SMP Thu Nov 14 17:32:43 UTC 2019
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.14.152-127.182.amzn2.x86_64 root=UUID=203041de-9d2d-4227-a2bc-2f97e7c55272 ro console=tty0 console=ttyS0,115200n8 net.ifnames=0 biosdevname=0 nvme_core.io_timeout=4294967295 rd.emergency=poweroff rd.shell=0
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
[ 0.000000] x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, using 'standard' format.
[ 0.000000] e820: BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009dfff] usable
@inductor
inductor / gist:70ba6d3fa81f776757dac5b35b6cfa65
Created December 13, 2019 02:21
説得テンプレート
親愛なるボス、
2020年3月30日から2020年4月2日、オランダのアムステルダムで開催されるKubeCon + CloudNativeCon Europeに参加したいと思います。私は多くのカンファレンスを調査しましたが、これはエコシステム全体の開発者、IT専門家、Cレベルのリーダーを集めて学習を共有し、イノベーションを強調し、KubernetesやPrometheusなどの技術を使ったマイクロサービスアーキテクチャとコンテナーオーケストレーションの新しいトレンドを含むクラウドネイティブコンピューティングの未来について議論するためのカンファレンスです。
このイベントには、業界で最も才能のある10,000人以上が集まり、業界の専門家とネットワークを構築し、クラウドネイティブエキスパートから学ぶのに最適な場所です。
2019年のKubeCon + CloudNativeCon Europeのデータをいくつか紹介し、参加者とその理由を説明します。
参加者の74%にとって、これは彼らの最初のKubeConであり、クラウドネイティブコミュニティの初心者が学ぶのに最適な場所です。
KubeCon + CloudNativeConに参加した上位2つの理由は、教育(72%)とネットワーキング(19%)でした。
参加者の36%は開発者であり、全体で77%以上の技術職に就いていました。
3,242社が参加し、その大部分はソフトウェア(36%)およびインターネットまたはWebサービス(16%)業界からのものでした。
カンファレンスの内容を把握するには、2019年のバルセロナのハイライトをご覧ください。
KubeCon + CloudNativeCon Europe 2020に参加して会社を強化する方法を以下に示します。
@inductor
inductor / install_h2o.sh
Created September 18, 2018 06:50
h2o install on ubuntu 18.04
#!/bin/bash
## apt update && apt upgrade -y && apt autoremove -y
## やろうとしたらlockファイルがあって死んだのでlockファイルを消した
## rm -rf /var/lib/dpkg/lock
apt update && apt upgrade -y && apt autoremove -y
apt -y install locate git cmake build-essential checkinstall autoconf pkg-config libtool python-sphinx wget libcunit1-dev nettle-dev libyaml-dev libuv-dev libssl-dev zlib1g-dev
git clone https://github.com/tatsuhiro-t/wslay.git
git clone https://github.com/h2o/h2o.git
cd wslay/
autoreconf -i
FROM python:3.8-slim as COVIDNet-CXR4-A
WORKDIR /download
# Download COVIDNet-CXR4-A
RUN pip3 install gdown && \
gdown https://drive.google.com/uc?id=1dCU5NV_-DKMKPUIJxO2MFU603LFkx5bd && \
gdown https://drive.google.com/uc?id=1cQ6Z3esdyTDuZJqc8lu8tL0sJ6GZCosI && \
gdown https://drive.google.com/uc?id=1-GW2qlGYcpNLgjy-q_f2XNYSlMzAbC8F && \
gdown https://drive.google.com/uc?id=1zGS8sA4HB6cnWfRlL8g18QJi_4tq6hNF
FROM python:3.8-slim as COVIDNet-SEV-GEO