Skip to content

Instantly share code, notes, and snippets.

View nwiizo's full-sized avatar
🏠
Working from home

Shuya Motouchi nwiizo

🏠
Working from home
View GitHub Profile
@nwiizo
nwiizo / README.md
Last active November 30, 2020 03:16
[雛型][ハンズオン]はじめてでもわかる!コンテナ入門 - 社内研修研修公開しちゃいます -

はじめてでもわかる!コンテナ入門 - 社内研修研修公開しちゃいます - https://gmo.connpass.com/event/194419/

今後、ローカル開発環境として利用してほしいため Kubernetes in Docker を利用する

install myapp

KindにはローカルのDockerイメージを読み込む機能が存在している。この章では自分で構築したアプリをコンテナ化して実際にデプロイいたしましす。 main.go

package main
@nwiizo
nwiizo / KBP.md
Last active January 21, 2020 09:22
Book Review: Kubernetes Best Practices

書評:Kubernetesのベストプラクティス 最近、Brendan Burns、Eddie Villalba、Dave Strebel、およびLachlan EvensonによるKubernetes Best Practicesを読み終えました。

私は最近Kubernetesに興味を持っていたので、この本を読んだときにKubernetesについてある程度の知識がありました(しかし、それほどではありませんでした)。

特に、第3章(「Kubernetesでの監視とログ」)、第4章(「構成、シークレット、およびRBAC」)、第10章(「ポッドとコンテナーセキュリティ」)、および第11章(「クラスターのポリシーとガバナンス」「) 大きな価値があります。

メモ/興味のある点が他の誰かに何らかの利益をもたらす場合に備えて、この特定の出版物を読んだことのハイライトを共有することにしました。だから、ここに私のハイライトがあります(章ごと)。すべての章がハイライトを持っているわけではないことに注意してください(内容と私の仕事の主な焦点によって異なります)。

第1章:基本サービスの設定

@nwiizo
nwiizo / README.md
Last active December 27, 2019 07:18
2019年12月19日 社内勉強会 part1

今後、ローカル開発環境として利用してほしいため Kubernetes in Docker を利用する

Pre Setup

下記は自分の検証環境で入っているversionなので特にこだわりなく入れてもらって大丈夫だと思います。

Install kind

/usr/bin/ 以下に配置しておいた方が取りまわしが良い事も多い

@nwiizo
nwiizo / README.md
Last active July 14, 2019 14:57
7月12日 麻生情報ビジネス専門学校 特別講義

ハンズオン

講義はどうでしたか?ここが良かった。悪かったなどがあるなら積極的にnwiizoにメンション飛ばしてください。

1. ConoHaの登録と VMの準備

  • アカウントの登録
  • 推奨OS Ubuntu 18.04 LTS (検証これでやった)
  • 推奨VMサイズ 4GB以上 ()

2. OSの基本設定とKubernetes

#!/bin/bash
flock -x /tmp/ab/wing ab -n 100 -c 5 http://localhost:8080/ > /tmp/ab/wing.txt
flock -x /tmp/ab/vps ab -n 100 -c 5 http://localhost:8888/ > /tmp/ab/vps.txt
wing_time=`cat /tmp/ab/wing.txt | grep "Time per request" |grep all | awk '{print $4;}'`
vps_time=`cat /tmp/ab/vps.txt | grep "Time per request" |grep all | awk '{print $4;}'`
wing_longest_request=`cat /tmp/ab/wing.txt | grep "longest request" | awk '{print $2}'`
vps_longest_request=`cat /tmp/ab/vps.txt | grep "longest request" | awk '{print $2}'`
echo ${wing_time}
#install golang 1.9
sudo apt install golang-1.9
#create synboric link
cd /usr/bin
sudo mv go go_16
sudo mv gofmt gofmt_16
sudo ln -s /usr/lib/go-1.9/bin/go /usr/bin/go
sudo ln -s /usr/lib/go-1.9/bin/gofmt /usr/bin/gofmt
#Check go version go1.9.2 linux/amd64
go version
apt-get -y install build-essential libtool autotools-dev automake pkg-config libssl-dev \
libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-chrono-dev \
libboost-program-options-dev libboost-test-dev libboost-thread-dev libboost-all-dev \
software-properties-common make autoconf
if [ -e /root/source/bitcoin-abc-0.16.1 ]; then
echo "bye"
else
wget https://github.com/Bitcoin-ABC/bitcoin-abc/archive/v0.16.1.tar.gz
tar zxf v0.16.1.tar.gz
cd bitcoin-abc-0.16.1
##
## bitcoin.conf configuration file. Lines beginning with # are comments.
##
# Network-related settings:
# Run on the test network instead of the real bitcoin network.
#testnet=0
# Run a regression test network
; Sample supervisor config file.
;
; For more information on the config file, please see:
; http://supervisord.org/configuration.html
;
; Notes:
; - Shell expansion ("~" or "$HOME") is not supported. Environment
; variables can be expanded using this syntax: "%(ENV_HOME)s".
; - Quotes around values are not supported, except in the case of
; the environment= options as shown below.
#!/usr/bin/bash
wget https://github.com/zeromq/zeromq4-1/releases/download/v4.1.5/zeromq-4.1.5.tar.gz
tar zxvf zeromq-4.1.5.tar.gz
cd zeromq-4.1.5
#install dependency
apt-get update && \
apt-get install -y libtool pkg-config build-essential autoconf automake uuid-dev