[OpenStack]Ubuntuへmicrostackインストール(成功)
最終的に成功したのがmicrostackだった。
しかも、ちょー簡単。
host: a320i
os: Ubuntu 20.04.4 LTS
kernel: 5.4.0-105-generic
手順は以下に従って進むだけ。
https://ubuntu.com/openstack/install
今回はAll In One構成が希望だから、「Single-node deployment」タブを選択。
後は手順に従いコマンドうつだけ。rootでなくて、一般ユーザからsudoコマンドを使う。
sudo snap install microstack --beta
snap list microstack
sudo /snap/bin/microstack init --auto --control
ここまででインストールは完了。
上記のようにmicrostackへのパスが通ってなかったので、bashrcへ追記して以降チュートリアルへ進む。
microstack.openstack image list
microstack.openstack flavor list
microstack launch cirros -n test
ssh -i /home/bob/snap/microstack/common/.ssh/id_microstack cirros@10.xx.yy.zzz
これで生成したインスタンスへsshでログイン出来た。
次はweb GUIログイン用のパスワードを確認する。
sudo snap get microstack config.credentials.keystone-password
次は別のPCからweb GUIへログインするが、10.xx.yy.zzz宛パケットが、microstackをインストールしたa320i PCへ届くように事前にデフォルトゲートウェイを変更しておく。
ブラウザでhttps://10.xx.yy.1:443へアクセスすると、推奨されないがアクセス出来た。
ユーザ名はadmin、パスワードは上記で入手した文字列でログイン出来た。
次はmicrostackの手順が学べるチュートリアルを探そう。
[OpenStack]トラブルシューティング
[root@localhost ~]# packstack --answer-file answer-file.txt
Welcome to the Packstack setup utility
The installation log file is available at: /var/tmp/packstack/20161104-081617-gI3tk6/openstack-setup.log
Installing:
Clean Up [ DONE ]
Discovering ip protocol version [ DONE ]
Setting up ssh keys [ DONE ]
Preparing servers [ ERROR ]
ERROR : Failed to run remote script, stdout:
stderr: ssh_exchange_identification: read: Connection reset by peer
Please check log file /var/tmp/packstack/20161104-081617-gI3tk6/openstack-setup.log for more information
対処法
systemctl start puppet
vi /etc/hosts.allow
> 追加
sshd: 192.168.10.
Pre installing Puppet and discovering hosts' details[ ERROR ]
[root@localhost ~]# packstack --answer-file answer-file.txt
Welcome to the Packstack setup utility
The installation log file is available at: /var/tmp/packstack/20161104-082243-uybSI3/openstack-setup.log
Installing:
Clean Up [ DONE ]
Discovering ip protocol version [ DONE ]
Setting up ssh keys [ DONE ]
Preparing servers [ DONE ]
Pre installing Puppet and discovering hosts' details[ ERROR ]
ERROR : Failed to run remote script, stdout: puppet-3.8.7-2.el7.noarch
hiera-1.3.4-5.el7.noarch
openssh-clients-6.6.1p1-25.el7_2.x86_64
tar-1.26-29.el7.x86_64
nmap-ncat-6.40-7.el7.x86_64
puppet-aodh-9.4.0-1.el7.noarch
puppet-apache-1.10.0-1.c04e062git.el7.noarch
:
+ rpm -q --whatprovides puppet
+ rpm -q --whatprovides
rpm: no arguments given for query
++ t
++ exit 1
Please check log file /var/tmp/packstack/20161104-082243-uybSI3/openstack-setup.log for more information
[OpenStack]RDO(Mitaka)
$ packstack --answer-file=answer.txt
ここでこんなエラー。
Copying Puppet modules and manifests [ DONE ]
Applying 192.168.56.100_prescript.pp
192.168.56.100_prescript.pp: [ DONE ]
Applying 192.168.56.100_amqp.pp
Applying 192.168.56.100_mariadb.pp
192.168.56.100_amqp.pp: [ ERROR ]
Applying Puppet manifests [ ERROR ]
ERROR : Error appeared during Puppet run: 192.168.56.100_amqp.pp
Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install erlang' returned 1: Error: Package: erlang-wx-18.3.4.4-1.el7.x86_64 (openstack-newton)
You will find full trace in log /var/tmp/packstack/20161029-044410-uGvd45/manifests/192.168.56.100_amqp.pp.log
Please check log file /var/tmp/packstack/20161029-044410-uGvd45/openstack-setup.log for more information
Additional information:
* Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components.
* File /root/keystonerc_admin has been created on OpenStack client host 192.168.56.100. To use the command line tools you need to source the file.
* To access the OpenStack Dashboard browse to http://192.168.56.100/dashboard .
Please, find your login credentials stored in the keystonerc_admin in your home directory.
* To use Nagios, browse to http://192.168.56.100/nagios username: nagiosadmin, password: xxxxxxx
忠実に出来たと思ったけど、よく見ると
プロミスキャスモードを「すべて許可」に設定
って設定してないや。これが原因か?
ホストオンリー
ゲストOS(CentOS)とホストOSの間で通信するためのネットワークアダプタ
192.168.56.1/24を設定
プロミスキャスモードを「すべて許可」に設定。(重要、ネストされたOpenStack上のVMが外部と通信するために必要な設定)
Management Netowrk
ifconfig xxxxx promisc
でプロミスキャスモードになるらしい。
それから再度
$ packstack --answer-file=answer.txt
やっても変わらなかった。
packstackはrootでやっちゃいけないらしいが、試しにrootで実行してみても、変わらず。
http://ehaselwanter.com/en/blog/2014/10/15/deploying-openstack-with-rdo-packstack/
この人は、調べたらEPEL6が必要だと言ってる。
wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -ivh epel-release-6-8.noarch.rpm
今回CentOS 7なので、7用の最新Verをインストールしてみたが、エラー変わらず。
erlangを手動でインストールしたら良いのか?と思い
http://qiita.com/kaikusakari/items/e990747ee5e9c34372de
ここを見て進めた。
#cd /usr/local/src
#wget http://www.erlang.org/download/otp_src_18.3.tar.gz
#yum install ncurses ncurses-devel
#yum install openssl openssl-devel
#curl -OL --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u73-b02/jdk-8u73-linux-x64.rpm
# rpm -ivh jdk-8u73-linux-x64.rpm
# tar -zxvf otp_src_18.3.tar.gz
# cd otp_src_18.3
# ./configure
確かこんな警告出てた。
wx : wxWidgets not found, wx will NOT be usable
真似して以下をインストール。
# yum install unixODBC unixODBC-devel fop
再度configureから。
# ./configure
# make
# make install
この後packstackしても特にエラー変わらず。
[OpenStack]
Vol.2‐「最新版OpenStack環境をオールインワン構成で構築」
http://resocia.jp/column/7116/
x1上のVMware
# cat /etc/redhat-release
CentOS Linux release 7.1.1503 (Core)
# uname -r
3.10.0-229.el7.x86_64
# yum update -y
# vi /etc/hosts
# systemctl disable NetworkManager
# systemctl stop NetworkManager
# yum install -y git
# git clone https://github.com/enakai00/quickrdo.git
# cd quickrdo/
# git checkout centos7-liberty
setup.shでエラー出たので中身を1つづつ実行してみる。
# yum -y install https://repos.fedorapeople.org/repos/openstack/openstack-liberty/rdo-release-liberty-5.noarch.rpm
※ 2じゃなくて5にしたら成功した。
# yum -y install openstack-packstack-7.0.0-0.7.dev1661.gaf13b7e.el7.noarch
# packstack --gen-answer-file=answers.txt
setup.shにある以下内容を手作業で修正。
sed -i 's/CONFIG_PROVISION_DEMO=.*/CONFIG_PROVISION_DEMO=n/' answers.txt
sed -i 's/CONFIG_SWIFT_INSTALL=.*/CONFIG_SWIFT_INSTALL=n/' answers.txt
sed -i 's/CONFIG_NAGIOS_INSTALL=.*/CONFIG_NAGIOS_INSTALL=n/' answers.txt
sed -i 's/CONFIG_HEAT_INSTALL=.*/CONFIG_HEAT_INSTALL=y/' answers.txt
sed -i 's/CONFIG_HEAT_CLOUDWATCH_INSTALL=.*/CONFIG_HEAT_CLOUDWATCH_INSTALL=y/' answers.txt
sed -i 's/CONFIG_HEAT_CFN_INSTALL=.*/CONFIG_HEAT_CFN_INSTALL=y/' answers.txt
sed -i 's/CONFIG_NEUTRON_ML2_TYPE_DRIVERS=.*/CONFIG_NEUTRON_ML2_TYPE_DRIVERS=local/' answers.txt
sed -i 's/CONFIG_NEUTRON_ML2_TENANT_NETWORK_TYPES=.*/CONFIG_NEUTRON_ML2_TENANT_NETWORK_TYPES=local/' answers.txt
# packstack --answer-file=answers.txt
# vi /etc/hosts
192.168.1.10 rdo00 を追加
NetworkError: Local IP address discovery failed. Please set nameserver correctly.
ERROR : Local IP address discovery failed. Please set nameserver correctly.
Traceback (most recent call last):
File "/usr/bin/packstack", line 15, in
run_setup.main()
File "/usr/lib/python2.7/site-packages/packstack/installer/run_setup.py", line 1019, in main
print(output_messages.ERR_CHECK_LOG_FILE_FOR_MORE_INFO % (logFile))
UnboundLocalError: local variable 'logFile' referenced before assignment
[OpenStack]RDO(1)
# yum install http://rdoproject.org/repos/rdo-release.rpm
# yum install openstack-packstack
# packstack --gen-answer-file=answer.txt
# vi answer.txt
編集
# packstack --answer-file=answer.txt
:
Applying 192.168.10.209_controller.pp
Testing if puppet apply is finished: 192.168.10.209_controller.pp [ / ]
Testing if puppet apply is finished: 192.168.10.209_controller.pp [ / ]
CentOS 7. (Core)
yum install -y update
network active on