openstack单节点环境搭建

栏目: 编程工具 · 发布时间: 5年前

内容简介:因为kolla比DevStack等方式要新一些,故最终选用kolla来安装。而kolla又分下面两种只是入门,就选择使用单点部署ubuntu 14.04 安装测试

因为kolla比DevStack等方式要新一些,故最终选用kolla来安装。而kolla又分下面两种

  • kolla-kubernetes (不如ansible成熟)
  • kolla-ansible

只是入门,就选择使用单点部署

系统环境

ubuntu 14.04 安装测试

步骤

主要根据参考中的 官方文档 来搭的环境,需要注意的是, kolla-ansible和kolla两个项目切到origin/stable/queens等稳定版本

根据文档安装完成后,可以登陆 Horizon dashboard 、访问nova等api接口,但是创建虚机还是会报错,留作后面再排错。

遇到的问题

  1. build image卡住没有进度

    解决方法:添加 docker 源
    /etc/docker/daemon.json
    {"registry-mirrors": ["https://a5aghnme.mirror.aliyuncs.com"]}
    
  2. 报错

    ERROR:kolla.common.utils.base:The command '/bin/sh -c yum -y install centos-release-ceph-luminous centos-release-opstools centos-release-qemu-ev epel-release yum-plugin-priorities && yum clean all && rm -rf /var/cache/yum' returned a non-zero code: 1
    
  3. docker-engine和docker.io冲突

    解决方法:卸载docker.io
    yum remove docker.io docker-common
    
  4. 找不到镜像

    Tag 7.0.0 not found in repository docker.io/kolla/centos-binary-cron
    
    解决方法:修改globals.yml中的配置指定tag
    
    Dockerhub images are tagged as pike, master, etc. Please set:
    openstack_release: "pike" in your globals.yml
    
  5. 报错

    Error starting daemon: error initializing graphdriver: \"/var/lib/docker\" contains several valid graphdrivers: devicemapper, overlay; Please cleanup or explicitly choose storage driver (-s <DRIVER>)
    到/var/lib/docker根据情况,将下面的overlay或者devicemapper文件夹删掉即可。这种情况发生在使用采用dc/os安装后,原有的devicemapper模式修改成了overlay,但是docker同时只能支持一种存储模式。
    
    不能删除/var/lib/docker/devicemapper 提示device busy时,可以umount /var/lib/docker/devicemapper后再删除
    
  6. Kolla-build: command not found

    pip install ./kolla
    
  7. 报错

    https://packagecloud.io/grafana/stable/el/7/x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 302 - Found
    
  8. docker python库报错

    load_config() got an unexpected keyword argument
    
    解决方法:不要按照官方文档安装python-docker-py
    pip install 'docker>=2.6,<3.0.0'
    
  9. 报错

    pip install ./kolla时报错
    Failed to fetch https://packagecloud.io/rabbitmq/rabbitmq-server/ubuntu/dists/xenial/InRelease  Unable to connect to packagecloud-repositories.s3.dualstack.us-west-1.amazonaws.com:https:
    INFO:kolla.common.utils.zookeeper:W: Some index files failed to download. They have been ignored, or old ones used instead.
    
    解决办法:
    pip install ./kolla --ignore-installed PyYAML
    
  10. pip依赖不能重装

    Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
    
  11. 部署中报错

    问题:
    The conditional check 'config_json.changed | bool or rabbitmq_confs.changed
    
    解决办法:kolla和kolla-ansible 都切到stable版本
    
    问题:
    fatal: [localhost]: FAILED! => {"msg": "Unable to look up a name or access an attribute in template string ({{ inventory_hostname in groups['neutron-metering-agent'] }}).\nMake sure your variable name does not contain invalid characters like '-': argument of type 'StrictUndefined' is not iterable"}
    
    解决办法:
    直接禁用haproxy
    
    问题:
    failed: [localhost] (item=/usr/share/kolla-ansible/ansible/roles/haproxy/templates/haproxy.cfg.j2) => {"changed": false, "item": "/usr/share/kolla-ansible/ansible/roles/haproxy/templates/haproxy.cfg.j2", "msg": "AnsibleUndefinedVariable: 'dict object' has no attribute 'glance-registry'"}
    
    解决办法:直接禁用haproxy
    enable_haproxy: "no"
    
    问题:
    rabbitmq_monitoring_password' is undefined"
    
    问题:
    .docker.io/v2/: dial tcp: lookup registry-1.docker.io on 192.168.0.2:53: read udp 192.168.0.10:48758->192.168.0.2:53: i/o timeout\")\\n'"}
    
    解决办法:
    修改/etc/hosts添加dns服务器:nameserver 8.8.8.8
    
    问题:
    只有一张物理网卡
    
    解决办法:
    ifconfig创建一个虚拟网卡
    ifconfig eth0:0 192.168.10.10 up
    
    问题:
    docker需要认证
    
    解决办法:
    docker login命令先登陆
    
    问题:
    TASK [neutron : Running Neutron bootstrap container] *************************** 卡住了
    
  12. 部署前检查报错

    fatal: [localhost]: FAILED! => {"changed": false, "cmd": ["ip", "-4", "-o", "addr", "show", "dev", "eth0"], "delta": "0:00:00.043125", "end": "2019-01-10 13:48:41.975511", "failed_when_result": true, "rc": 0, "start": "2019-01-10 13:48:41.932386", "stderr": "", "stderr_lines": [], "stdout": "2: eth0    inet 192.168.16.88/20 brd 192.168.31.255 scope global noprefixroute eth0\\       valid_lft forever preferred_lft forever", "stdout_lines": ["2: eth0    inet 192.168.16.88/20 brd 192.168.31.255 scope global noprefixroute eth0\\       valid_lft forever preferred_lft forever"]}
    
  13. 登陆dabashboard提示证书不可用

    原因:账号密码不正确
    
    账号默认是admin,密码在cat /etc/kolla/passwords.yml|grep -i keystone_admin
    

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

数据结构与算法:Python语言描述

数据结构与算法:Python语言描述

裘宗燕 / 机械工业出版社 / 2016-1 / CNY 45.00

本书基于Python语言介绍了数据结构与算法的基本知识,主要内容包括抽象数据类型和Python面向对象程序设计、线性表、字符串、栈和队列、二叉树和树、集合、排序以及算法的基本知识。本书延续问题求解的思路,从解决问题的目标来组织教学内容,注重理论与实践的并用。一起来看看 《数据结构与算法:Python语言描述》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具