您好,登录后才能下订单哦!
这篇文章给大家分享的是Ansible安装和配置OpenSDS的步骤,相信大部分人都还不知道怎么安装和p'z,为了让大家学会,给大家总结了以下内容,话不多说,一起往下看吧。
系统: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 <your_volume_id>
访问OpenSDS WEB-UI
地址:http://{your_host_ip}:8088
默认权限:admin/opensds@123
看完上述内容,你们掌握安装和配置OpenSDS的方法了吗?如果还想学到更多技能或想了解更多相关内容,欢迎关注亿速云行业资讯频道,感谢各位的阅读!
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。