目标:3台物理机组成单控制节点openstack
作者:BCEC大马哥
Fuel master IPMI login:
admin/12345678
Fuel master example:
10.254.1.1
root/sybk2015
Notes/Rules:
- 这些浪潮服务器共有4个网口,其中eth0/eth1是光口,eth2/eth3是电口
- IT分配的vlan都是业务vlan,所有业务vlan都走的是光口,所以eth2/eth3是不能用这些vlan的;同时,eth0/eth1 不能作为pxe口,否则dhcp boot request不会带vlan tag,所以到不了master的eth0/eth1
- IPMI地址和PXE地址是一一对应的。比如:IPMI为10.255.2.x,那么其PXE地址为10.254.2.x。而且IT要求两个地址的x一定要一致。
- Fuel master做dhcp server的时候,必须指定mac,且IP和mac绑定
- DHCP pool for node discovery里面的地址,需要在cobbler中dnsmasq中配置
- Static pool for node installed里面的地址,可以通过修改postgresql或者restful api设置
- Fuel的服务跑中容器中,arch: https://wiki.openstack.org/wiki/Fuel
- Fuel doc:https://docs.mirantis.com/openstack/fuel/fuel-6.0/operations.html (包含docker例子)
https://docs.mirantis.com/openstack/fuel/fuel-6.0/user-guide.html (包含CLI例子)
https://docs.mirantis.com/openstack/fuel/fuel-6.0/reference-architecture.html#network-architecture - 服务器管理地址上看到的eth0不能设置“局域网设置”为“启用”
- Fuel configure file: /etc/fuel/astute.yaml
Fuel配置:
disable eth0
enable eth2
static pool和discovery pool可以一样:
退出菜单后,可以执行fuelmenu再次打开:
安装完成之后:
http://10.254.2.101:8000/ (admin/admin)
ssh root@10.254.2.101 (password: r00tme)
在reset slaver之前,需要在dnsmasq中绑定mac和IP地址。具体配置参见Issue-3。
在Fuel页面上配置完Openstack环境之后,在deploy之前需要修改数据库(或者使用REST API),以绑定PXE static IP和节点之间的关系:
- 在master上执行一下(否则下一步看不到某些IP):
[root@fuel ~]# fuel --env 1 deployment default
Default deployment info was downloaded to /root/deployment_1
[root@fuel ~]# fuel node list
id | status | name | cluster | ip | mac | roles | pending_roles | online
---|----------|------------------|---------|--------------|-------------------|-------|-------------------|-------
2 | discover | Untitled (56:6d) | 1 | 10.254.2.104 | 6c:92:bf:0d:56:6d | | cinder, compute | True
3 | discover | Untitled (30:2d) | 1 | 10.254.2.103 | 6c:92:bf:0d:30:2d | | cinder, compute | True
1 | discover | Untitled (5c:8d) | 1 | 10.254.2.105 | 6c:92:bf:0d:5c:8d | | controller, mongo | True - 用navicat连接Nailgun数据库,修改ip_addr表,并保存!
另,这个表应该记录了mac地址和ip地址的绑定关系。在以下遇到的问题中,有需要重启cobbler/dnsmasq的,重启之后,会由 /etc/cobbler/dnsmasq.template的内容重写/etc/dnsmasq.conf。而/etc/cobbler /dnsmasq.template中有一句“$insert_cobbler_system_definitions”,应该是读取这个表的内容并插入 /etc/dnsmasq.conf
Issue-1:
403 Forbidden
docker ps
dockerctl list
ngnix logs:
[root@fuel nginx]# pwd
/var/log/docker-logs/nginx
[root@fuel nginx]# ll
总用量 20
-rw-r--r-- 1 root root 0 6月 11 17:22 access.log
-rw-r--r-- 1 root root 6332 6月 15 13:53 access_nailgun.log
-rw-r--r-- 1 root root 0 6月 11 17:22 access_repo.log
-rw-r--r-- 1 root root 0 6月 11 17:22 error.log
-rw-r--r-- 1 root root 8590 6月 15 13:53 error_nailgun.log
-rw-r--r-- 1 root root 0 6月 11 17:22 error_repo.log
==> error_nailgun.log <==
2015/06/15 15:08:21 [error] 464#0: *34 "/usr/share/nailgun/static/index.html" is forbidden (13: Permission denied), client: 172.17.42.1, server: localhost, request: "GET / HTTP/1.1", host: "10.254.2.101:8000"
==> access_nailgun.log <==
172.17.42.1 - - [15/Jun/2015:15:08:21 +0100] "GET / HTTP/1.1" 403 564 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.152 Safari/537.36"
[root@fuel nginx]# ll /usr/share/nailgun
ls: 无法访问/usr/share/nailgun: 没有那个文件或目录
[root@fuel nginx]#
gaojin:
应该进docker里面去看,而不是走host上看。
进到nailgun里面发现的确没有/usr/share/nailgun/static/index.html
尝试手动启动一个nailgun:
[root@fuel nailgun]# docker run -it -v /var/www/nailgun:/var/www/nailgun -v /etc/fuel/:/etc/fuel/ fuel/nailgun_5.1.1 /bin/bash
docker inspect container-id 可以查看该容器的配置,发现HostIp不对,应该是eth2的IP 10.254.2.101,而不是eth0上的default IP 10.20.0.2
"NetworkSettings": {
"IPAddress": "172.17.0.3",
"IPPrefixLen": 16,
"Gateway": "172.17.42.1",