这篇文章给大家分享的是Ansible安装和配置OpenSDS的步骤,相信大部分人都还不知道怎么安装和p'z,为了让大家学会,给大家总结了以下内容,话不多说,一起往下看吧。
创新互联公司是一家专注于网站建设、成都网站设计与策划设计,全椒网站建设哪家好?创新互联公司做网站,专注于网站建设10多年,网设计领域的专业建站公司;建站业务涵盖:全椒等地区。全椒做网站价格咨询:18982081108
系统:Ubuntu16.04
节点:All in One
安装依赖
> apt-get update && apt-get install -y git make curl wget libltdl7 libseccomp2 libffi-dev gawk
安装Docker
> wget https://download.docker.com/linux/ubuntu/dists/xenial/pool/stable/amd64/docker-ce_18.06.1~ce~3-0~ubuntu_amd64.deb
> dpkg -i docker-ce_18.06.1~ce~3-0~ubuntu_amd64.deb
安装Docker-Compose
> curl -L "https://github.com/docker/compose/releases/download/1.23.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
> chmod +x /usr/local/bin/docker-compose
安装golang
> wget https://storage.googleapis.com/golang/go1.12.1.linux-amd64.tar.gz
> tar -C /usr/local -xzf go1.12.1.linux-amd64.tar.gz
> echo 'export PATH=$PATH:/usr/local/go/bin' >> /etc/profile
> echo 'export GOPATH=$HOME/gopath' >> /etc/profile
> source /etc/profile
>
> root@opensds:~# go version
> go version go1.12.1 linux/amd64
>
GitHub克隆OpenSDS
> git clone https://github.com/opensds/opensds-installer.git
> cd opensds-installer/ansible
> git checkout stable/capri
下载Ansible
> chmod +x ./install_ansible.sh && ./install_ansible.sh
> ansible --version # Ansible version 2.4.x is required.
配置OpenSDS Ansible变量
修改host_ip
cat opensds-installer/ansible/group_vars/common.yml
# This field indicates local machine host ip
host_ip: 127.0.0.1
# This field indicates which project should be deploy
# 'hotpot', 'gelato' or 'all'
deploy_project: all
配置OpenSDS lvm后端
> cat opensds-installer/ansible/group_vars/osdsdock.yml
>
> enabled_backends: lvm
Ansible开始安装
> ansible-playbook site.yml -i local.hosts -vvv
> ##注:安装很慢,因为很多docker镜像在国外,可以采用docker镜像加速或者同步到国内
>
CLI操作
> sudo cp /opt/opensds-hotpot-linux-amd64/bin/osdsctl /usr/local/bin/
>
> 配置环境变量
> vi opensds_source.sh
> export OPENSDS_ENDPOINT=http://{your_real_host_ip}:50040
> export OPENSDS_AUTH_STRATEGY=keystone
> export OS_AUTH_URL=http://{your_real_host_ip}/identity
> export OS_USERNAME=admin
> export OS_PASSWORD=opensds@123
> export OS_TENANT_NAME=admin
> export OS_PROJECT_NAME=admin
> export OS_USER_DOMAIN_ID=default
>
> source opendsd_source.sh
>
> osdsctl pool list
创建默认的块存储profile
osdsctl profile create '{"name": "default", "description": "default policy", "storageType": "block"}'
创建Volume
osdsctl volume create 1 --name=test-001
查询Volume
osdsctl volume list
删除Volume
osdsctl volume delete
访问OpenSDS WEB-UI
地址:http://{your_host_ip}:8088
默认权限:admin/opensds@123
看完上述内容,你们掌握安装和配置OpenSDS的方法了吗?如果还想学到更多技能或想了解更多相关内容,欢迎关注创新互联行业资讯频道,感谢各位的阅读!
标题名称:Ansible安装和配置OpenSDS的步骤
本文来源:http://scgulin.cn/article/gcpdip.html