堅牢性を高めるためのinfrastructure as code

Post on 08-Jan-2017

510 Views

Category:

Technology

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

{

“名前” : “真壁徹(まかべ とおる)”,

“所属” : “日本マイクロソフト株式会社”,

“役割” : “クラウド ソリューションアーキテクト”,

“経歴” : “大和総研 HP Enterprise”,

“特技” : [ “クラウド”, “OSS”, “ビール” ]

}

「このクラウドに載るシステムは

非常に重要であるため

プロビジョニング申請受領後

Hardeningなどの作業に

3営業日を要します」

むしろ「脆い」かもしれない

{ "$schema":

"http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",

"contentVersion": "1.0.0.0","parameters": { "adminUsername":

{ "type": "string", "defaultValue": "azureuser", "metadata": { "description": "User name for the Virtual Machine." } }…

- hosts: webserversvars: http_port: 80max_clients: 200remote_user: roottasks:- name: ensure apache is at the latest

versionyum: name=httpd state=latest

- name: write the apache config file template: src=/srv/httpd.j2…

「実現したい環境」をコードにできる -> 技術者の働き方が変わる

GUIがうれしいのは

3回目まで

バージョニング、テスト、コラボレーション、etc

みなが専門家ではないので、楽に適用できるようにする

「実環境はコードの通りです」

うちのシステムはどっちかって言うと「守り」モードなんですよね

えっ、守りにも効くんすか

いやもうほんと、ちょっとだけですから

勇気をもって、システムに任せましょう

• 変更作業は必ず自動化ツール経由で

• まず開発・検証環境やPoCで自信をつける

システムA システムB システムC

共通インフラチーム

http://slide.meguro.ryuzee.com/slides/75

Dynamic Static

Frontend subnet

Backend Subnet踏み台 Subnet

resource "azurerm_network_security_rule" "frontend_web80" {

name = "frontend_web80“

priority = 100

direction = "Inbound"

access = "Allow“

protocol = "Tcp"

source_port_range = "*"

destination_port_range = "80"

…VPN

Gateway

Dynamic Resources

DatastoreLogging&AnalyticsService

Datastore

Static Resources

ToolsAzure

Dynamic Static Utilities

Code

PowerShell/Azure CLI

Terraform

Packer

Ansible

(ローカル/オンプレミス/Azure VMを要件に合わせて選択) (オンプレミス

/AzureのVMにGitlabなどを配置してもよい)

Jenkins

PowerShell/Azure CLI

https://channel9.msdn.com/Events/de-code/2016/INF-011

Packer

https://www.packer.io/docs/

Ansible

https://www.terraform.io/docs/index.html

Dynamic & Static

Resources

Terraform

リソースにアクセスできる Active Directory アプリケーションを作成するhttps://azure.microsoft.com/ja-jp/documentation/articles/resource-group-authenticate-service-principal/

http://torumakabe.github.io/post/azure_auditlog_alert/

カジュアルにVMでも作ってみよう

あー、エージェント入れるの、めんどくせー

監査ログアラート

Azure Automation

例: OMS(ログ管理エージェントの導入)

https://azure.microsoft.com/ja-jp/documentation/articles/role-based-access-control-what-is/

http://torumakabe.github.io/post/azure_cli_resourcepolicy/

気分転換に欧州でGシリーズを起動してみよう

あれっ

Jackie Stewart, the Formula 1 racing legend

これまで培ったインフラの知識は、クラウドでも無駄になりません。むしろ武器です。

“Infrastructure as Code”

(O’Reilly Media, June 2016)概念の整理と言葉使いで、とても参考になりました

top related