Skip to content
This repository has been archived by the owner on Dec 2, 2022. It is now read-only.

k8sでのクラスタ運用のためのコード #570

Merged
merged 57 commits into from Sep 25, 2019

Conversation

takehaya
Copy link
Member

@takehaya takehaya commented Aug 16, 2019

これ何

k8sでスコアサーバーを運用するためのconfig & script

何をした

  • k8sクラスタを構築するための terraform & ansible
  • ansibleのhostsを生成するshell script
  • FQDNをk8sのコンフィグに適用するためのshell script
  • k8sのmanifest
  • これらの大まかな手順を書いたmarkdownファイル
  • 証明書適用について

Create LICENSE to apply MIT license
@takehaya takehaya requested a review from uplus August 16, 2019 11:46
@takehaya takehaya self-assigned this Aug 16, 2019
@takehaya takehaya force-pushed the feature/provisioning_k8s branch 2 times, most recently from 2591092 to 64dd075 Compare August 16, 2019 12:01
@uplus uplus added this to In progress in Next via automation Aug 16, 2019
@takehaya
Copy link
Member Author

とりあえず立ちあがるところまでと一通りの手順を書いた。あとはFQDNとIngressの追加をする

@takehaya
Copy link
Member Author

話した結果、プロキシが必要なのでLoadbalanceが必要

@takehaya
Copy link
Member Author

takehaya commented Aug 20, 2019

プロキシも書いたあとはFQDNとhttps対応

@takehaya takehaya marked this pull request as ready for review August 20, 2019 15:11
k8s/api.yaml Outdated Show resolved Hide resolved
@takehaya takehaya changed the title [WIP] k8sでのクラスタ運用のためのコード k8sでのクラスタ運用のためのコード Aug 31, 2019
@uplus uplus moved this from In progress to Review in progress in Next Sep 11, 2019
@uplus
Copy link
Member

uplus commented Sep 11, 2019

コメントしたやつお願い:pray:
手が開いて無ければ代わりにやる

Copy link
Member

@uplus uplus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. k8sクラスタデプロイ用のファイル, k8sで一度だけapplyが必要なファイル, アプリケーションのファイルが1つのディレクトリにごっちゃになってるので分ける
  2. UPDATE強制にしてたせいでツリーがひどいことになってるのでrebaseしてforce push(squash mergeすれば平気かも知れないが)

k8s/readme.md Outdated Show resolved Hide resolved
k8s/readme.md Outdated Show resolved Hide resolved
k8s/api.yaml Outdated Show resolved Hide resolved
k8s/deploy_ready.py Outdated Show resolved Hide resolved
k8s/readme.md Outdated Show resolved Hide resolved
uplus
uplus previously approved these changes Sep 18, 2019
@uplus
Copy link
Member

uplus commented Sep 18, 2019

良さげなのでapproveしました お疲れ様でした
もう1人のreviewerを待ってsquash mergeします

@yukamoja
Copy link

Helmのインストールに関する追記願い

tarをダウンロードする方法とsnapでインストールする方法の二つがあるが、両者を試したところhelm installでcert-managerをインストールできたのがtarのみだった。

インストール方法が二つあるため、どちらを使うかを明記する必要があると考える。以下に私がhelmをインストールする際に使ったコマンドを記載する。

helmを使ったcert-managerのインストールに関する修正願い

上記の方法でhelmをインストールした際にreadmeにあるhelmインストールでは Unknown flag --name と出てしまいinstallできなかった。そこで以下のコマンドを使いcert-managerをインストールした。
helm install -g jetstack/cert-manager --namespace cert-manager --version v0.9.1

api.yaml等のapplyについて

kubectl -f redis.yaml,ui.yaml,db.yaml,api.yaml,service-nodeport.yaml <- apply が抜けてる

その他

readmeのclaster setupapi.yamlとui.yamlの以下のような部分をよしなに直そう。使い方は、ここのmetadataのnameをingress.yamlのpathに指定しよう とあるが、<name>-<namespace>-bind-svc の をenv.yamlの __VAR__NAMESPACE と一致させる必要があると考えているがここに関して少し話したい。

@takehaya
Copy link
Member Author

takehaya commented Sep 22, 2019

上記の方法でhelmをインストールした際にreadmeにあるhelmインストールでは Unknown flag --name と出てしまいinstallできなかった。そこで以下のコマンドを使いcert-managerをインストールした。

[must] ちなみになんですが、これの理由はわかりますか?できればそれも教えてもらえると助かります!💡
僕の手元だと動いていた物を写しただけだったので非常に疑問を持ってます。何故なのでしょう🤔

readmeのclaster setup に api.yamlとui.yamlの以下のような部分をよしなに直そう。使い方は、ここのmetadataのnameをingress.yamlのpathに指定しよう とあるが、--bind-svc の をenv.yamlの __VAR__NAMESPACE と一致させる必要があると考えているがここに関して少し話したい。

これは、__VAR__NAMESPACEと--bind-svcのを一致させる必要があるという話をしてるという認識でいいですか?
もしその場合ならあっています。これについては書いてると思うし、別issueに切り出してジェネレーターに変数展開の機能を作ろうかと考えてるのでその時までは運用でカバーしようかと思ってます💡

Copy link

@yukamoja yukamoja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

helmでcert-managerをインストールするとき、v3.0.0の場合は以下のコマンドで通ったので、編集お願いします

helm install -g jetstack/cert-manager
--namespace cert-manager
--version v0.9.1

Copy link

@yukamoja yukamoja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

readmeの修正を確認しました。
ありがとうございます。

@takehaya
Copy link
Member Author

俺はマージするぞjojo!!!!

@takehaya takehaya merged commit f1ff573 into develop Sep 25, 2019
Next automation moved this from Review in progress to Done Sep 25, 2019
@takehaya
Copy link
Member Author

雑にrevertしてしまったがdevelopで積んでもらったほうがよかったな・・・:bow:

@uplus
Copy link
Member

uplus commented Sep 25, 2019

この状況でrevertは悪化するだけなので

@takehaya
Copy link
Member Author

すまん 🙇

@uplus uplus mentioned this pull request Sep 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Next
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants