Windows Server 2016 で作るシンプルなハイパーコンバージドインフラ (Microsoft TechSummit 2016)Takamasa Maejima
2016年11月に開催された Microsoft TechSummit 2016 での、Windows Server 2016 ストレージ機能 (SDS) を活用したハイパーコンバージドインフラ (HCI) に関するセッションスライドです。
[イベント名] Microsoft TechSummit 2016
[開催日] 2016年11月1日
[セッションID] CDP-002
[セッションタイトル] Windows Server 2016 で作るシンプルなハイパーコンバージドインフラ
8. DBサーバ設定
・ 4.5.4.2. Install the Database on a Separate Node
[root@db01 ~]# rpm -qa |grep mysql
mysql-server-5.1.61-4.el6.x86_64
mysql-libs-5.1.61-4.el6.x86_64
mysql-5.1.61-4.el6.x86_64
mysql-serverをインストール
[root@db01 ~]# vi /etc/my.cnf
しておくこと。
[mysqld]セクションに次の行を挿入します
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
innodb_rollback_on_timeout=1 ☆追加
innodb_lock_wait_timeout=600 ☆追加
max_connections=700 ☆追加 管理サーバ2台の場合は 700に
log-bin=mysql-bin ☆追加
binlog-format = 'ROW' ☆追加
bind-address = 0.0.0.0 ☆追加
1管理サーバあたり 350を目安
[root@db01 ~]# service mysqld restart
に
mysqld を停止中: [ OK ]
mysqld を起動中: [ OK ]
9. DBサーバ設定
[root@db01 ~]# mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
Change the root password? [Y/n] Y
Remove anonymous users? [Y/n] Y
Disallow root login remotely? [Y/n] n
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n] Y
... Success!
Cleaning up...
「Disallow root login remotely」
以外は全て「Y」で設定。
All done! If you've completed all of the above steps, your MySQL
• installation should now be secure.
Thanks for using MySQL!
10. DB設定 ※ManagmenetServerから実施
[root@manager01 ~]# yum install mysql
切り分けのためmysql-client
(省略)
をインストールしておくと
Complete!
便利です。
データベースをセットアップします。
# cloud-setup-databases cloud:DBパスワード@DBサーバのIPアドレス --deploy-as=root:DBサーバの
パスワード
※必要に応じて、-e <encryption_type> -m <management_server_key> -k <database_key>を付けて
セキュリティ設定を行いましょう。
ManagmenetServerインストール
(省略)
Applying /usr/share/cloud/setup/bridge/db/cloudbridge_offering.sql [ OK ]
Applying /usr/share/cloud/setup/bridge/db/cloudbridge_offering_alter.sql [ OK ]
Processing encryption ... [ OK ]
Finalizing setup ... [ OK ]
CloudStack has successfully initialized database, you can check your database configuration in /etc/
cloud/management/db.properties
12. ManagmenetServer設定
4.5.6. Prepare and Start Additional Management Servers
[root@manager01 ~]# cloud-setup-management
Starting to configure CloudStack Management Server:
Configure sudoers ... [OK]
KVM環境ではvhd-utilは不要
Configure Firewall ... [OK]
なので飛ばす。
Configure CloudStack Management Server ...[OK]
CloudStack Management Server setup is Done!
root@manager01 network-scripts]# mkdir -p /mnt/secondary
[root@manager01 network-scripts]# mount -t nfs 172.16.10.19:/export/secondary /mnt/secondary
[root@manager01 network-scripts]# cd /mnt/secondary/
[root@manager01 secondary]# cat > hoge
test file
[root@manager01 secondary]# ls -al hoge
• -rw-r--r--. 1 root root 10 11月 4 18:31 2012 hoge
[root@manager01 secondary]# rm hoge
root, rootで作成されていること
を確認する
13. ManagmenetServer設定
システムVM用のテンプレートの配置
[root@manager01 secondary]# cd
[root@manager01 ~]# wget
http://download.cloud.com/templates/acton/acton-systemvm-02062012.qcow2.bz2
(省略)
[root@manager01 ~]# /usr/lib64/cloud/common/scripts/storage/secondary/cloud-install-sys-tmplt -
m /mnt/secondary -f acton-systemvm-02062012.qcow2.bz2 -h kvm -F
• Uncompressing to /usr/lib64/cloud/common/scripts/storage/secondary/38d0870e-d5f2-43a5-
a2b7-276c41796a5f.qcow2.tmp (type bz2)...could take a long time
Moving to /mnt/secondary/template/tmpl/1/3///38d0870e-d5f2-43a5-
a2b7-276c41796a5f.qcow2...could take a while
wgetで一旦落としておいて、
-f オプションで指定した方
• Successfully installed system VM template acton-systemvm-02062012.qcow2.bz2 to /mnt/
secondary/template/tmpl/1/3/
がやり直し時には便利。
[root@manager01 ~]# umount /mnt/secondary/
システムVMと仮想ルータ用のテ
ンプレートがSecondaryStorageに
格納されます。