SlideShare una empresa de Scribd logo
1 de 32
Descargar para leer sin conexión
AWSではじめる
 GlusterFS



         2012/8/22
             hbstudy#36
自己紹介
名前:片山暁雄
 所属:アマゾンデータサービスジャパン
 職種:ソリューションアーキテクト
 @c9katayama
好きなミドルウェア:
 Apache Tomcat
好きなLinux
 Amazon Linux
         Copyright © 2012 Amazon Web Services
本日のアジェンダ

AWS(Amazon Web Services)のご紹介
AWSではじめるGlusterFS
まとめ




        Copyright © 2012 Amazon Web Services
AWS(Amazon Web Services)
のご紹介




       Copyright © 2012 Amazon Web Services
世界中でサービスを展開中
                                                            リージョン
                                                            エッジローケーション


      オレゴン
         GovCloud
                                                               東京

                                   ダブリン
               バージニア
    カリフォルニア



                                                           シンガポール
                           サンパウロ

           初期費用なしで全世界のインフラを利用可能

               データは指定した地域に置かれる


5                   Copyright © 2012 Amazon Web Services
AWSの様々なサービス
                                    お客様のアプリケーション
                                                                                               デプロイと自動化
ライブラリ & SDKs               IDEプラグイン           Web管理画面                        モニタリング                               Development &
                                                                認証                              AWS Elastic
 Java, PHP, .NET,              Eclipse        Management                       Amazon
                                                               AWS IAM                           Beanstalk        Administration
   Python, Ruby             Visual Studio       Console                      CloudWatch
                                                                                             AWS CloudFromation


                メッセージ
                                                      メール配信                               ワークフロー管理
               Amazon SNS
                                                     Amazon SES                           Amazon SWF
               Amazon SQS
                                                                                                                   Application
                                                                                                                   Service
              コンテンツ配信                                  分散処理                               キャッシング
             Amazon CloudFront                    Elastic MapReduce                    Amazon Elasticache


                                                    ストレージ
        コンピュータ処理                                                                          データベース
                                                     Amazon S3
                                                                                        Amazon RDS
         Amazon EC2                               Amazon EBS                         Amazon DynamoDB
               Auto Scale                      AWS StorageGateway                     Amazon SimpleDB
                                                 Amazon Glacier
                                                                                                                  Infrastructure
                                       ネットワーク & ルーティング                                                            Service
                    Amazon VPC / Amazon Elastic Load Balancer / Amazon Route 53 /AWS Direct Connect



                                        AWS グローバルインフラ
    Region     AZ
                     Geographical Regions, Availability Zones, Points of Presence
6                                            Copyright © 2012 Amazon Web Services
EC2   Amazon EC2(Elastic Compute Cloud)
  リージョン
             アベイラビリティ                                  アベイラビリティ
               ゾーン A           任意のゾーンに                   ゾーン B

                 EC2           分散配置可能
                                1                         EC2




      数分で起動可能な仮想サーバ
      1時間ごとの従量課金で利用可能
      14種類の仮想サーバを選択可能
      Windows, Linuxなどx86-64アーキテクチャのOSが利用可能
      OS以上は自由に触れる
        GlusterFSでもJbossでもインストール可能


                Copyright © 2012 Amazon Web Services
EBS   Amazon EBS(Elastic Block Store)
                        /dev/xvdf
                                      EBS
               EC2                                    S3

                         /dev/xvdg EBS



      EC2にマウント可能なストレージ
      1EBSあたり最大1TB
      複数のEBSを1つのEC2インスタンスにアタッチ可能
       EBSを別のEC2にマウントしなおす事も可能
       ただし複数のEC2から1つのEBSをマウントすることは出来ない
      任意のファイルシステムでフォーマット
      スナップショット機能
       任意の時点の全データをS3へ保管

               Copyright © 2012 Amazon Web Services
NASA火星探査機「Curiosity」

・火星探査ミッションのライブ配信
・3つのリージョン、300台以上のサーバー
・WebサイトにもAWSを利用
NASAのWebシステムアーキテクチャ




              ・WebサーバにNginx、CMSにRailo
              を使用

              ・GlusterFSをCMSのファイ
              ル共有ディスクに

              ・使用サービス:
              CloudFront,Route53,ELB,EC2,RDS,
              S3,CloudWatch
AWSではじめるGlusterFS




      Copyright © 2012 Amazon Web Services
GlusterFSをAWSで実行すると・・

 サーバ、ディスクの調達が容易
  時間課金で試すのが簡単
                                     RHELも従量課金!!

 異なるデータセンター間・遠隔地へのレプリカテストが
 容易
  世界中のデータセンターが使える


 GlusterFSを使用して、冗長的なアーキテクチャを実装
 可能
  最も困難なデータ冗長化を実現
  クラウドアーキテクチャの自由度が大幅にUP

         Copyright © 2012 Amazon Web Services
Step1 まずは2台でハンズオン
 t1.microのAmazonLinuxインスタンスを同一アベイ
 ラビリティゾーンに2台起動

 GlusterFSのインストール
  yum localinstall -y     http://adsj-demo.s3.amazonaws.com/gluster-
   fs3.3/glusterfs-3.3.0-1.el6.x86_64.rpm http://adsj-
   demo.s3.amazonaws.com/gluster-fs3.3/glusterfs-server-3.3.0-
   1.el6.x86_64.rpm http://adsj-demo.s3.amazonaws.com/gluster-
   fs3.3/glusterfs-fuse-3.3.0-1.el6.x86_64.rpm
                                                                    2つに
                                                                  インストール
  service glusterd start
                                                          EC2   EBS



                                                          EC2   EBS

                   Copyright © 2012 Amazon Web Services
Step1 まずは2台でハンズオン

 レプリカ設定
  gluster peer probe EC2インスタンス2IP
  gluster vol create vol01 replica 2 EC2インスタンス
   1IP:/mnt/ebs/brick-vol01 EC2インスタンス
   2IP:/mnt/ebs/brick-vol01
  gluster vol start vol01                 EC2 EBS

                                                                  レプリカ

                                                      EC2
 マウント                                                       EBS

  mkdir /mnt/gluster-vol01
  mount -t glusterfs EC2インスタンス1IP:/vol01
   /mnt/gluster-vol01


               Copyright © 2012 Amazon Web Services
片山さん、めんどくさいよ・・・




    Copyright © 2012 Amazon Web Services
良いものアリます!

AWS CloudFormation
 JSONテンプレートを元に、システムを一気に構成



ボタンをクリックでCF発動




CloudFormationテンプレート
 http://adsj-demo.s3.amazonaws.com/gluster-
  fs3.3/gluster-fs-sample-2replica.json
            Copyright © 2012 Amazon Web Services
{
    "AWSTemplateFormatVersion" : "2010-09-09",

    "Description" : "GlusterFS Sample. Replicate between two EC2 instances.",

    "Parameters" : {
      "KeyName" : {
        "Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instance",
        "Type" : "String"
      }
    },

    "Resources" : {
      "Ec2Instance" : {
        "Type" : "AWS::EC2::Instance",
        "Properties" : {
          "InstanceType" : "t1.micro",
          "AvailabilityZone" : "ap-northeast-1a",
          "SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ],
          "KeyName" : { "Ref" : "KeyName" },
          "ImageId" : "ami-2819aa29",
          "Tags" : [{"Key": "Name", "Value": "2Replica-GlusterA1"}],
          "UserData": { "Fn::Base64": { "Fn::Join": [ "", [
                "#!/bin/bashn",
                "mkdir /glustern",
                "yum localinstall -y http://adsj-demo.s3.amazonaws.com/gluster-fs3.3/glusterfs-3.3.0-1.el6.x86_64.rpm http://adsj-demo.s3.amazonaws.com/gluster-fs3.3/glusterfs-server-3.3.0-1.el6.x86_64.rpm http://adsj-demo.s3.amazonaws.com/gluster-fs3.3/glusterfs-fuse-3.3.0-1.el6.x86_64.rpmn",
                "service glusterd startn"
                ]]
              }
            }
        }
      },
      "Ec2Instance2" : {
        "Type" : "AWS::EC2::Instance",
        "Properties" : {
          "InstanceType" : "t1.micro",
          "AvailabilityZone" : "ap-northeast-1a",
          "SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ],
          "KeyName" : { "Ref" : "KeyName" },
          "ImageId" : "ami-2819aa29",
          "Tags" : [{"Key": "Name", "Value": "2Replica-GlusterA2+Client"}],
          "UserData": { "Fn::Base64": { "Fn::Join": [ "", [
                "#!/bin/bashn",
                "mkdir /glustern",
                "yum localinstall -y http://adsj-demo.s3.amazonaws.com/gluster-fs3.3/glusterfs-3.3.0-1.el6.x86_64.rpm http://adsj-demo.s3.amazonaws.com/gluster-fs3.3/glusterfs-server-3.3.0-1.el6.x86_64.rpm http://adsj-demo.s3.amazonaws.com/gluster-fs3.3/glusterfs-fuse-3.3.0-1.el6.x86_64.rpmn",
                "service glusterd startn",
                "gluster peer probe ", { "Fn::GetAtt" : [ "Ec2Instance", "PrivateDnsName" ] },"n",
                "HOSTNAME=`hostname`n",
                "gluster vol create vol01 replica 2 ","$HOSTNAME:/gluster/brick-vol01 ", { "Fn::GetAtt" : [ "Ec2Instance", "PrivateDnsName" ] }, ":/gluster/brick-vol01n",
                "gluster vol start vol01n",
                "mkdir /mnt/gluster-vol01n",
                "mount -t glusterfs ","$HOSTNAME:/vol01 /mnt/gluster-vol01n"
                ]]
              }
            }

      },
        }

     "InstanceSecurityGroup" : {
          "Type" : "AWS::EC2::SecurityGroup",
          "Properties" : {
                                                                                                                                                 Type" : "AWS::EC2::Instance",
              "GroupDescription" : "EC2 Instance access"

      },
          }

      "SGroupIngress1" : {
          "Type" : "AWS::EC2::SecurityGroupIngress",
          "Properties" : {
                                                                                                                                                    "Properties" : {
              "GroupName" : { "Ref" : "InstanceSecurityGroup" },




          }
              "IpProtocol" : "tcp",
              "ToPort" : "65535",
              "FromPort" : "1",
              "SourceSecurityGroupName" : { "Ref" : "InstanceSecurityGroup" }
                                                                                                                                                     "InstanceType" : "t1.micro",
      },
      "SGroupIngress2" : {
          "Type" : "AWS::EC2::SecurityGroupIngress",
          "Properties" : {
              "GroupName" : { "Ref" : "InstanceSecurityGroup" },
              "IpProtocol" : "tcp",
                                                                                                                                                     "AvailabilityZone" : "ap-northe
              "ToPort" : "22",




    },
      }
          }
              "FromPort" : "22",
              "CidrIp" : "0.0.0.0/0"
                                                                                                                                                     "SecurityGroups" : [ { "Ref" : "I
    "Outputs" : {
      "InstanceId" : {


      },
        "Description" : "InstanceId of the newly created EC2 instance",
        "Value" : { "Ref" : "Ec2Instance2" }
                                                                                                                                                     "KeyName" : { "Ref" : "KeyNa
      "PublicIP" : {


      },
        "Description" : "Public IP address of the newly created EC2 instance",
        "Value" : { "Fn::GetAtt" : [ "Ec2Instance2", "PublicIp" ] }

      "PublicDNS" : {
        "Description" : "Public DNSName of the newly created EC2 instance",
                                                                                                                                                     "ImageId" : "ami-2819aa29",
        "Value" : { "Fn::GetAtt" : [ "Ec2Instance2", "PublicDnsName" ] }
      }
    }
}



                                                                                                  Copyright © 2012 Amazon Web Services
Step2 AZ間のデータ同期                                     4つで1ボリューム

インスタンス起動
  t1.microのLinuxインスタンスを異                           EC2    EBS
   なるAZに2台づつ起動。
                          Zone-A
  4つで1ボリューム
                                                    EC2           EBS
                                                          レプリカ
GlusterFSを4台にインストール

                                                                 レプリカ
レプリカ設定                                              EC2    EBS
  レプリカを2に設定                             Zone-B
  AZで2対になるように設定
                                                    EC2           EBS

ファイルシステムにマウント

             Copyright © 2012 Amazon Web Services
片山さん、更にめんどくさいよ・・・




    Copyright © 2012 Amazon Web Services
もちろんアリます!

AWS CloudFormation
 作ったシステム構成は、一気に破棄できます。



ボタンで発動



CloudFormationテンプレート
 http://adsj-demo.s3.amazonaws.com/gluster-
  fs3.3/gluster-fs-sample-4replica-2az.json
              Copyright © 2012 Amazon Web Services
Step3 よりグローバルなシステム
 複数のリージョンを使ったシステム
   例えば日本とシンガポールをまたいだシステム構築
   バックアップシステムやDRシステム


 Geo-Replication
   遠隔地へ、非同期でデータを同期
   マスター/スレーブモデル
Replicated Volumes                        Geo-replication
クラスター内でデータをミラーリング                         地理的に離れたクラスタでデータ
                                          をミラーリング
高可用性を提供                                   バックアップやDR用途
同期処理                                      非同期処理


                     Copyright © 2012 Amazon Web Services
EC2     EBS
USリージョン
                         レプリカ
(マスター)
          EC2      EBS



                 Geo-Replication                         通常ファイル
                                                         システム指定
                                                           も可

                                         EC2      EBS
                    シンガポール                              レプリカ
                    (スレーブ)
                                         EC2      EBS




           Copyright © 2012 Amazon Web Services
全世界17カ所のAZでGluster可能
                                                         リージョン
                                                         ア   ベイラビ   リ ゾーン
                                                                    ティ

       オレゴン


                                                              東京

                               ダブリン
               バージニア
     カリフォルニア


                                                       シンガポール
                       サンパウロ




23              Copyright © 2012 Amazon Web Services
Geo-Replicationの構築手順
 http://d.hatena.ne.jp/c9katayama/20120819




              Copyright © 2012 Amazon Web Services
Step4 あんまり使わないデータ
勢いでGlusterFSに貯めたものの、実はあんまり使わな
いデータ
 アクセスログ
 ユーザー操作履歴
 加工前の画像・元データ
 動画元データ

冗長化している分、ディスク費用がかかる




        Copyright © 2012 Amazon Web Services
Amazon Glacier

 Glacier(グレーシャー)=氷河

 非常に低価格かつ高耐久性のアーカイブ用ストレージ
  1Gbyteあたり月間約0.8円でデータ保管可能
  99.999999999%の耐久性(複数箇所に保存)
  1ファイル40Tbyte、ファイル数上限なし

 G to G to G (Gluster to Geo to Glacier)

                   氷結

            Copyright © 2012 Amazon Web Services
AWS 無料使用枠(12ヵ月)

Amazon EC2 750時間/月のLinux マイクロインスタンス
  複数インスタンスでも、合計750時間/月であれば無料利用枠に該当
Amazon EC2 750時間/月のWindows Server マイクロインス
タンス
  複数インスタンスでも、合計750時間/月であれば無料利用枠に該当
Amazon EBS
  30 GB に加え、200万 I/O、スナップショット ストレージ 1 GB
Elastic Load Balancing
  750時間に加え 15 GB 分のデータ処理
帯域幅「送信(アウト)」15 GB


    十分GlusterFS試せます!


               Copyright © 2012 Amazon Web Services
Tips
 ネットワークおよびEBSのIOパフォーマンスが欲しい場合
   大きいインスタンス、大きいEBSボリュームを使用して下さい
   EBSのストライピングも可能
   Provisioned IOPSのEBSボリュームなら、安定したIOPSを提供

 使用前のウォームアップ
   EBS全領域へ一度書き込む事をお勧めします

 エフェメラルディスクでもGlusterFS
   料金無料の内蔵ディスクもGlusterなら便利に利用可能
   ログの保存などに
   2TのSSDを内蔵したEC2インスタンスもリリース


            Copyright © 2012 Amazon Web Services
まとめ




      Copyright © 2012 Amazon Web Services
まとめ
Gluster おためしするなら AWS!

無料枠 十分これで 試せます!
  アカウント 作成までが 勉強会


Glusterで クラウド設計 柔軟に!
 商用の Glusterなら Red Hat




        Copyright © 2012 Amazon Web Services
http://aws.amazon.com/jp/event_s
  chedule/awssummittokyo2012/


         Copyright © 2012 Amazon Web Services
32

Más contenido relacionado

Más de Akio Katayama

JAWS-UG名古屋 Lambda-LT
JAWS-UG名古屋 Lambda-LTJAWS-UG名古屋 Lambda-LT
JAWS-UG名古屋 Lambda-LTAkio Katayama
 
[JAWS-UG 三都物語 2014] 三都物語でAmazon SWFと握手!
[JAWS-UG 三都物語 2014] 三都物語でAmazon SWFと握手! [JAWS-UG 三都物語 2014] 三都物語でAmazon SWFと握手!
[JAWS-UG 三都物語 2014] 三都物語でAmazon SWFと握手! Akio Katayama
 
AWS Cloud Design Pattern for Enterprise
AWS Cloud Design Pattern for EnterpriseAWS Cloud Design Pattern for Enterprise
AWS Cloud Design Pattern for EnterpriseAkio Katayama
 
あたらしいCloud Design Pattern
あたらしいCloud Design PatternあたらしいCloud Design Pattern
あたらしいCloud Design PatternAkio Katayama
 
AWS re:Invent 2013 参加報告(新サービスとセッション)
AWS re:Invent 2013 参加報告(新サービスとセッション)AWS re:Invent 2013 参加報告(新サービスとセッション)
AWS re:Invent 2013 参加報告(新サービスとセッション)Akio Katayama
 
AWS上で使えるストレージ十番勝負
AWS上で使えるストレージ十番勝負AWS上で使えるストレージ十番勝負
AWS上で使えるストレージ十番勝負Akio Katayama
 
AWSの共有責任モデル(shared responsibility model)
AWSの共有責任モデル(shared responsibility model)AWSの共有責任モデル(shared responsibility model)
AWSの共有責任モデル(shared responsibility model)Akio Katayama
 
AWSマイスターシリーズReloaded(AWS Beanstalk)
AWSマイスターシリーズReloaded(AWS Beanstalk)AWSマイスターシリーズReloaded(AWS Beanstalk)
AWSマイスターシリーズReloaded(AWS Beanstalk)Akio Katayama
 
CDP Night #1 静的コンテンツ配信編
CDP Night #1 静的コンテンツ配信編CDP Night #1 静的コンテンツ配信編
CDP Night #1 静的コンテンツ配信編Akio Katayama
 
AWSマイスターシリーズReloaded(AWS Cloudformation)
AWSマイスターシリーズReloaded(AWS Cloudformation)AWSマイスターシリーズReloaded(AWS Cloudformation)
AWSマイスターシリーズReloaded(AWS Cloudformation)Akio Katayama
 
Amazon SimpleWorkflowのご紹介
Amazon SimpleWorkflowのご紹介Amazon SimpleWorkflowのご紹介
Amazon SimpleWorkflowのご紹介Akio Katayama
 
Aws meister-cloud formation-summit2012
Aws meister-cloud formation-summit2012Aws meister-cloud formation-summit2012
Aws meister-cloud formation-summit2012Akio Katayama
 
Aws elastic beanstalk-handson-summit2012
Aws elastic beanstalk-handson-summit2012Aws elastic beanstalk-handson-summit2012
Aws elastic beanstalk-handson-summit2012Akio Katayama
 
AWSクラウドデザインパターン(CDP) - コンテンツ配信編 -
AWSクラウドデザインパターン(CDP) - コンテンツ配信編 -AWSクラウドデザインパターン(CDP) - コンテンツ配信編 -
AWSクラウドデザインパターン(CDP) - コンテンツ配信編 -Akio Katayama
 
AWSマイスターシリーズ(Elastic Beanstalk)
AWSマイスターシリーズ(Elastic Beanstalk)AWSマイスターシリーズ(Elastic Beanstalk)
AWSマイスターシリーズ(Elastic Beanstalk)Akio Katayama
 

Más de Akio Katayama (20)

AWS Mahjong
AWS MahjongAWS Mahjong
AWS Mahjong
 
JAWS-UG名古屋 Lambda-LT
JAWS-UG名古屋 Lambda-LTJAWS-UG名古屋 Lambda-LT
JAWS-UG名古屋 Lambda-LT
 
[JAWS-UG 三都物語 2014] 三都物語でAmazon SWFと握手!
[JAWS-UG 三都物語 2014] 三都物語でAmazon SWFと握手! [JAWS-UG 三都物語 2014] 三都物語でAmazon SWFと握手!
[JAWS-UG 三都物語 2014] 三都物語でAmazon SWFと握手!
 
AWS Cloud Design Pattern for Enterprise
AWS Cloud Design Pattern for EnterpriseAWS Cloud Design Pattern for Enterprise
AWS Cloud Design Pattern for Enterprise
 
あたらしいCloud Design Pattern
あたらしいCloud Design PatternあたらしいCloud Design Pattern
あたらしいCloud Design Pattern
 
AWS re:Invent 2013 参加報告(新サービスとセッション)
AWS re:Invent 2013 参加報告(新サービスとセッション)AWS re:Invent 2013 参加報告(新サービスとセッション)
AWS re:Invent 2013 参加報告(新サービスとセッション)
 
AWS上で使えるストレージ十番勝負
AWS上で使えるストレージ十番勝負AWS上で使えるストレージ十番勝負
AWS上で使えるストレージ十番勝負
 
AWSの共有責任モデル(shared responsibility model)
AWSの共有責任モデル(shared responsibility model)AWSの共有責任モデル(shared responsibility model)
AWSの共有責任モデル(shared responsibility model)
 
PHP on Cloud
PHP on CloudPHP on Cloud
PHP on Cloud
 
AWSマイスターシリーズReloaded(AWS Beanstalk)
AWSマイスターシリーズReloaded(AWS Beanstalk)AWSマイスターシリーズReloaded(AWS Beanstalk)
AWSマイスターシリーズReloaded(AWS Beanstalk)
 
CDP Night #1 静的コンテンツ配信編
CDP Night #1 静的コンテンツ配信編CDP Night #1 静的コンテンツ配信編
CDP Night #1 静的コンテンツ配信編
 
AWSマイスターシリーズReloaded(AWS Cloudformation)
AWSマイスターシリーズReloaded(AWS Cloudformation)AWSマイスターシリーズReloaded(AWS Cloudformation)
AWSマイスターシリーズReloaded(AWS Cloudformation)
 
Amazon SimpleWorkflowのご紹介
Amazon SimpleWorkflowのご紹介Amazon SimpleWorkflowのご紹介
Amazon SimpleWorkflowのご紹介
 
Aws meister-cloud formation-summit2012
Aws meister-cloud formation-summit2012Aws meister-cloud formation-summit2012
Aws meister-cloud formation-summit2012
 
Aws elastic beanstalk-handson-summit2012
Aws elastic beanstalk-handson-summit2012Aws elastic beanstalk-handson-summit2012
Aws elastic beanstalk-handson-summit2012
 
AWSクラウドデザインパターン(CDP) - コンテンツ配信編 -
AWSクラウドデザインパターン(CDP) - コンテンツ配信編 -AWSクラウドデザインパターン(CDP) - コンテンツ配信編 -
AWSクラウドデザインパターン(CDP) - コンテンツ配信編 -
 
AWSマイスターシリーズ(Elastic Beanstalk)
AWSマイスターシリーズ(Elastic Beanstalk)AWSマイスターシリーズ(Elastic Beanstalk)
AWSマイスターシリーズ(Elastic Beanstalk)
 
AWS Update 2011/10
AWS Update 2011/10AWS Update 2011/10
AWS Update 2011/10
 
Aws sdk for java
Aws sdk for javaAws sdk for java
Aws sdk for java
 
Elastic beanstalk
Elastic beanstalkElastic beanstalk
Elastic beanstalk
 

Último

IoT in the era of generative AI, Thanks IoT ALGYAN.pptx
IoT in the era of generative AI, Thanks IoT ALGYAN.pptxIoT in the era of generative AI, Thanks IoT ALGYAN.pptx
IoT in the era of generative AI, Thanks IoT ALGYAN.pptxAtomu Hidaka
 
20240412_HCCJP での Windows Server 2025 Active Directory
20240412_HCCJP での Windows Server 2025 Active Directory20240412_HCCJP での Windows Server 2025 Active Directory
20240412_HCCJP での Windows Server 2025 Active Directoryosamut
 
Amazon SES を勉強してみる その12024/04/12の勉強会で発表されたものです。
Amazon SES を勉強してみる その12024/04/12の勉強会で発表されたものです。Amazon SES を勉強してみる その12024/04/12の勉強会で発表されたものです。
Amazon SES を勉強してみる その12024/04/12の勉強会で発表されたものです。iPride Co., Ltd.
 
PHP-Conference-Odawara-2024-04-000000000
PHP-Conference-Odawara-2024-04-000000000PHP-Conference-Odawara-2024-04-000000000
PHP-Conference-Odawara-2024-04-000000000Shota Ito
 
プレイマットのパターン生成支援ツール
プレイマットのパターン生成支援ツールプレイマットのパターン生成支援ツール
プレイマットのパターン生成支援ツールsugiuralab
 
Postman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By DanielPostman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By Danieldanielhu54
 
プレイマットのパターン生成支援ツールの評価
プレイマットのパターン生成支援ツールの評価プレイマットのパターン生成支援ツールの評価
プレイマットのパターン生成支援ツールの評価sugiuralab
 
新人研修のまとめ 2024/04/12の勉強会で発表されたものです。
新人研修のまとめ       2024/04/12の勉強会で発表されたものです。新人研修のまとめ       2024/04/12の勉強会で発表されたものです。
新人研修のまとめ 2024/04/12の勉強会で発表されたものです。iPride Co., Ltd.
 

Último (8)

IoT in the era of generative AI, Thanks IoT ALGYAN.pptx
IoT in the era of generative AI, Thanks IoT ALGYAN.pptxIoT in the era of generative AI, Thanks IoT ALGYAN.pptx
IoT in the era of generative AI, Thanks IoT ALGYAN.pptx
 
20240412_HCCJP での Windows Server 2025 Active Directory
20240412_HCCJP での Windows Server 2025 Active Directory20240412_HCCJP での Windows Server 2025 Active Directory
20240412_HCCJP での Windows Server 2025 Active Directory
 
Amazon SES を勉強してみる その12024/04/12の勉強会で発表されたものです。
Amazon SES を勉強してみる その12024/04/12の勉強会で発表されたものです。Amazon SES を勉強してみる その12024/04/12の勉強会で発表されたものです。
Amazon SES を勉強してみる その12024/04/12の勉強会で発表されたものです。
 
PHP-Conference-Odawara-2024-04-000000000
PHP-Conference-Odawara-2024-04-000000000PHP-Conference-Odawara-2024-04-000000000
PHP-Conference-Odawara-2024-04-000000000
 
プレイマットのパターン生成支援ツール
プレイマットのパターン生成支援ツールプレイマットのパターン生成支援ツール
プレイマットのパターン生成支援ツール
 
Postman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By DanielPostman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By Daniel
 
プレイマットのパターン生成支援ツールの評価
プレイマットのパターン生成支援ツールの評価プレイマットのパターン生成支援ツールの評価
プレイマットのパターン生成支援ツールの評価
 
新人研修のまとめ 2024/04/12の勉強会で発表されたものです。
新人研修のまとめ       2024/04/12の勉強会で発表されたものです。新人研修のまとめ       2024/04/12の勉強会で発表されたものです。
新人研修のまとめ 2024/04/12の勉強会で発表されたものです。
 

Awsではじめるgluster fs 20120726-public

  • 1. AWSではじめる GlusterFS 2012/8/22 hbstudy#36
  • 2. 自己紹介 名前:片山暁雄  所属:アマゾンデータサービスジャパン  職種:ソリューションアーキテクト  @c9katayama 好きなミドルウェア:  Apache Tomcat 好きなLinux  Amazon Linux Copyright © 2012 Amazon Web Services
  • 4. AWS(Amazon Web Services) のご紹介 Copyright © 2012 Amazon Web Services
  • 5. 世界中でサービスを展開中 リージョン エッジローケーション オレゴン GovCloud 東京 ダブリン バージニア カリフォルニア シンガポール サンパウロ 初期費用なしで全世界のインフラを利用可能 データは指定した地域に置かれる 5 Copyright © 2012 Amazon Web Services
  • 6. AWSの様々なサービス お客様のアプリケーション デプロイと自動化 ライブラリ & SDKs IDEプラグイン Web管理画面 モニタリング Development & 認証 AWS Elastic Java, PHP, .NET, Eclipse Management Amazon AWS IAM Beanstalk Administration Python, Ruby Visual Studio Console CloudWatch AWS CloudFromation メッセージ メール配信 ワークフロー管理 Amazon SNS Amazon SES Amazon SWF Amazon SQS Application Service コンテンツ配信 分散処理 キャッシング Amazon CloudFront Elastic MapReduce Amazon Elasticache ストレージ コンピュータ処理 データベース Amazon S3 Amazon RDS Amazon EC2 Amazon EBS Amazon DynamoDB Auto Scale AWS StorageGateway Amazon SimpleDB Amazon Glacier Infrastructure ネットワーク & ルーティング Service Amazon VPC / Amazon Elastic Load Balancer / Amazon Route 53 /AWS Direct Connect AWS グローバルインフラ Region AZ Geographical Regions, Availability Zones, Points of Presence 6 Copyright © 2012 Amazon Web Services
  • 7. EC2 Amazon EC2(Elastic Compute Cloud) リージョン アベイラビリティ アベイラビリティ ゾーン A 任意のゾーンに ゾーン B EC2 分散配置可能 1 EC2 数分で起動可能な仮想サーバ 1時間ごとの従量課金で利用可能 14種類の仮想サーバを選択可能 Windows, Linuxなどx86-64アーキテクチャのOSが利用可能 OS以上は自由に触れる  GlusterFSでもJbossでもインストール可能 Copyright © 2012 Amazon Web Services
  • 8. EBS Amazon EBS(Elastic Block Store) /dev/xvdf EBS EC2 S3 /dev/xvdg EBS EC2にマウント可能なストレージ 1EBSあたり最大1TB 複数のEBSを1つのEC2インスタンスにアタッチ可能  EBSを別のEC2にマウントしなおす事も可能  ただし複数のEC2から1つのEBSをマウントすることは出来ない 任意のファイルシステムでフォーマット スナップショット機能  任意の時点の全データをS3へ保管 Copyright © 2012 Amazon Web Services
  • 10. NASAのWebシステムアーキテクチャ ・WebサーバにNginx、CMSにRailo を使用 ・GlusterFSをCMSのファイ ル共有ディスクに ・使用サービス: CloudFront,Route53,ELB,EC2,RDS, S3,CloudWatch
  • 11. AWSではじめるGlusterFS Copyright © 2012 Amazon Web Services
  • 12. GlusterFSをAWSで実行すると・・ サーバ、ディスクの調達が容易  時間課金で試すのが簡単 RHELも従量課金!! 異なるデータセンター間・遠隔地へのレプリカテストが 容易  世界中のデータセンターが使える GlusterFSを使用して、冗長的なアーキテクチャを実装 可能  最も困難なデータ冗長化を実現  クラウドアーキテクチャの自由度が大幅にUP Copyright © 2012 Amazon Web Services
  • 13. Step1 まずは2台でハンズオン t1.microのAmazonLinuxインスタンスを同一アベイ ラビリティゾーンに2台起動 GlusterFSのインストール  yum localinstall -y http://adsj-demo.s3.amazonaws.com/gluster- fs3.3/glusterfs-3.3.0-1.el6.x86_64.rpm http://adsj- demo.s3.amazonaws.com/gluster-fs3.3/glusterfs-server-3.3.0- 1.el6.x86_64.rpm http://adsj-demo.s3.amazonaws.com/gluster- fs3.3/glusterfs-fuse-3.3.0-1.el6.x86_64.rpm 2つに インストール  service glusterd start EC2 EBS EC2 EBS Copyright © 2012 Amazon Web Services
  • 14. Step1 まずは2台でハンズオン レプリカ設定  gluster peer probe EC2インスタンス2IP  gluster vol create vol01 replica 2 EC2インスタンス 1IP:/mnt/ebs/brick-vol01 EC2インスタンス 2IP:/mnt/ebs/brick-vol01  gluster vol start vol01 EC2 EBS レプリカ EC2 マウント EBS  mkdir /mnt/gluster-vol01  mount -t glusterfs EC2インスタンス1IP:/vol01 /mnt/gluster-vol01 Copyright © 2012 Amazon Web Services
  • 15. 片山さん、めんどくさいよ・・・ Copyright © 2012 Amazon Web Services
  • 17. { "AWSTemplateFormatVersion" : "2010-09-09", "Description" : "GlusterFS Sample. Replicate between two EC2 instances.", "Parameters" : { "KeyName" : { "Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instance", "Type" : "String" } }, "Resources" : { "Ec2Instance" : { "Type" : "AWS::EC2::Instance", "Properties" : { "InstanceType" : "t1.micro", "AvailabilityZone" : "ap-northeast-1a", "SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ], "KeyName" : { "Ref" : "KeyName" }, "ImageId" : "ami-2819aa29", "Tags" : [{"Key": "Name", "Value": "2Replica-GlusterA1"}], "UserData": { "Fn::Base64": { "Fn::Join": [ "", [ "#!/bin/bashn", "mkdir /glustern", "yum localinstall -y http://adsj-demo.s3.amazonaws.com/gluster-fs3.3/glusterfs-3.3.0-1.el6.x86_64.rpm http://adsj-demo.s3.amazonaws.com/gluster-fs3.3/glusterfs-server-3.3.0-1.el6.x86_64.rpm http://adsj-demo.s3.amazonaws.com/gluster-fs3.3/glusterfs-fuse-3.3.0-1.el6.x86_64.rpmn", "service glusterd startn" ]] } } } }, "Ec2Instance2" : { "Type" : "AWS::EC2::Instance", "Properties" : { "InstanceType" : "t1.micro", "AvailabilityZone" : "ap-northeast-1a", "SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ], "KeyName" : { "Ref" : "KeyName" }, "ImageId" : "ami-2819aa29", "Tags" : [{"Key": "Name", "Value": "2Replica-GlusterA2+Client"}], "UserData": { "Fn::Base64": { "Fn::Join": [ "", [ "#!/bin/bashn", "mkdir /glustern", "yum localinstall -y http://adsj-demo.s3.amazonaws.com/gluster-fs3.3/glusterfs-3.3.0-1.el6.x86_64.rpm http://adsj-demo.s3.amazonaws.com/gluster-fs3.3/glusterfs-server-3.3.0-1.el6.x86_64.rpm http://adsj-demo.s3.amazonaws.com/gluster-fs3.3/glusterfs-fuse-3.3.0-1.el6.x86_64.rpmn", "service glusterd startn", "gluster peer probe ", { "Fn::GetAtt" : [ "Ec2Instance", "PrivateDnsName" ] },"n", "HOSTNAME=`hostname`n", "gluster vol create vol01 replica 2 ","$HOSTNAME:/gluster/brick-vol01 ", { "Fn::GetAtt" : [ "Ec2Instance", "PrivateDnsName" ] }, ":/gluster/brick-vol01n", "gluster vol start vol01n", "mkdir /mnt/gluster-vol01n", "mount -t glusterfs ","$HOSTNAME:/vol01 /mnt/gluster-vol01n" ]] } } }, } "InstanceSecurityGroup" : { "Type" : "AWS::EC2::SecurityGroup", "Properties" : { Type" : "AWS::EC2::Instance", "GroupDescription" : "EC2 Instance access" }, } "SGroupIngress1" : { "Type" : "AWS::EC2::SecurityGroupIngress", "Properties" : { "Properties" : { "GroupName" : { "Ref" : "InstanceSecurityGroup" }, } "IpProtocol" : "tcp", "ToPort" : "65535", "FromPort" : "1", "SourceSecurityGroupName" : { "Ref" : "InstanceSecurityGroup" } "InstanceType" : "t1.micro", }, "SGroupIngress2" : { "Type" : "AWS::EC2::SecurityGroupIngress", "Properties" : { "GroupName" : { "Ref" : "InstanceSecurityGroup" }, "IpProtocol" : "tcp", "AvailabilityZone" : "ap-northe "ToPort" : "22", }, } } "FromPort" : "22", "CidrIp" : "0.0.0.0/0" "SecurityGroups" : [ { "Ref" : "I "Outputs" : { "InstanceId" : { }, "Description" : "InstanceId of the newly created EC2 instance", "Value" : { "Ref" : "Ec2Instance2" } "KeyName" : { "Ref" : "KeyNa "PublicIP" : { }, "Description" : "Public IP address of the newly created EC2 instance", "Value" : { "Fn::GetAtt" : [ "Ec2Instance2", "PublicIp" ] } "PublicDNS" : { "Description" : "Public DNSName of the newly created EC2 instance", "ImageId" : "ami-2819aa29", "Value" : { "Fn::GetAtt" : [ "Ec2Instance2", "PublicDnsName" ] } } } } Copyright © 2012 Amazon Web Services
  • 18. Step2 AZ間のデータ同期 4つで1ボリューム インスタンス起動  t1.microのLinuxインスタンスを異 EC2 EBS なるAZに2台づつ起動。 Zone-A  4つで1ボリューム EC2 EBS レプリカ GlusterFSを4台にインストール レプリカ レプリカ設定 EC2 EBS  レプリカを2に設定 Zone-B  AZで2対になるように設定 EC2 EBS ファイルシステムにマウント Copyright © 2012 Amazon Web Services
  • 19. 片山さん、更にめんどくさいよ・・・ Copyright © 2012 Amazon Web Services
  • 20. もちろんアリます! AWS CloudFormation  作ったシステム構成は、一気に破棄できます。 ボタンで発動 CloudFormationテンプレート  http://adsj-demo.s3.amazonaws.com/gluster- fs3.3/gluster-fs-sample-4replica-2az.json Copyright © 2012 Amazon Web Services
  • 21. Step3 よりグローバルなシステム 複数のリージョンを使ったシステム  例えば日本とシンガポールをまたいだシステム構築  バックアップシステムやDRシステム Geo-Replication  遠隔地へ、非同期でデータを同期  マスター/スレーブモデル Replicated Volumes Geo-replication クラスター内でデータをミラーリング 地理的に離れたクラスタでデータ をミラーリング 高可用性を提供 バックアップやDR用途 同期処理 非同期処理 Copyright © 2012 Amazon Web Services
  • 22. EC2 EBS USリージョン レプリカ (マスター) EC2 EBS Geo-Replication 通常ファイル システム指定 も可 EC2 EBS シンガポール レプリカ (スレーブ) EC2 EBS Copyright © 2012 Amazon Web Services
  • 23. 全世界17カ所のAZでGluster可能 リージョン ア ベイラビ リ ゾーン ティ オレゴン 東京 ダブリン バージニア カリフォルニア シンガポール サンパウロ 23 Copyright © 2012 Amazon Web Services
  • 25. Step4 あんまり使わないデータ 勢いでGlusterFSに貯めたものの、実はあんまり使わな いデータ  アクセスログ  ユーザー操作履歴  加工前の画像・元データ  動画元データ 冗長化している分、ディスク費用がかかる Copyright © 2012 Amazon Web Services
  • 26. Amazon Glacier Glacier(グレーシャー)=氷河 非常に低価格かつ高耐久性のアーカイブ用ストレージ  1Gbyteあたり月間約0.8円でデータ保管可能  99.999999999%の耐久性(複数箇所に保存)  1ファイル40Tbyte、ファイル数上限なし G to G to G (Gluster to Geo to Glacier) 氷結 Copyright © 2012 Amazon Web Services
  • 27. AWS 無料使用枠(12ヵ月) Amazon EC2 750時間/月のLinux マイクロインスタンス  複数インスタンスでも、合計750時間/月であれば無料利用枠に該当 Amazon EC2 750時間/月のWindows Server マイクロインス タンス  複数インスタンスでも、合計750時間/月であれば無料利用枠に該当 Amazon EBS  30 GB に加え、200万 I/O、スナップショット ストレージ 1 GB Elastic Load Balancing  750時間に加え 15 GB 分のデータ処理 帯域幅「送信(アウト)」15 GB 十分GlusterFS試せます! Copyright © 2012 Amazon Web Services
  • 28. Tips ネットワークおよびEBSのIOパフォーマンスが欲しい場合  大きいインスタンス、大きいEBSボリュームを使用して下さい  EBSのストライピングも可能  Provisioned IOPSのEBSボリュームなら、安定したIOPSを提供 使用前のウォームアップ  EBS全領域へ一度書き込む事をお勧めします エフェメラルディスクでもGlusterFS  料金無料の内蔵ディスクもGlusterなら便利に利用可能  ログの保存などに  2TのSSDを内蔵したEC2インスタンスもリリース Copyright © 2012 Amazon Web Services
  • 29. まとめ Copyright © 2012 Amazon Web Services
  • 30. まとめ Gluster おためしするなら AWS! 無料枠 十分これで 試せます!  アカウント 作成までが 勉強会 Glusterで クラウド設計 柔軟に!  商用の Glusterなら Red Hat Copyright © 2012 Amazon Web Services
  • 31. http://aws.amazon.com/jp/event_s chedule/awssummittokyo2012/ Copyright © 2012 Amazon Web Services
  • 32. 32