{"id":12000,"date":"2023-09-19T13:40:17","date_gmt":"2023-09-19T20:40:17","guid":{"rendered":"https:\/\/www.xh86.me\/?p=12000"},"modified":"2023-09-19T13:40:17","modified_gmt":"2023-09-19T20:40:17","slug":"skyline-dashboard","status":"publish","type":"post","link":"https:\/\/www.xh86.me\/?p=12000","title":{"rendered":"Skyline Dashboard"},"content":{"rendered":"<h2 id=\"\u5148\u51b3\u6761\u4ef6\">\u5148\u51b3\u6761\u4ef6<\/h2>\n<ul>\n<li>\u4e00\u4e2a\u81f3\u5c11\u8fd0\u884c\u6838\u5fc3\u7ec4\u4ef6\u7684\u00a0OpenStack\u00a0\u73af\u5883, \u5e76\u80fd\u901a\u8fc7\u00a0Keystone endpoint\u00a0\u8bbf\u95ee\u00a0OpenStack\u00a0\u7ec4\u4ef6<\/li>\n<li>\u4e00\u4e2a\u5b89\u88c5\u6709\u5bb9\u5668\u5f15\u64ce\u7684 (\u00a0docker\u00a0\u6216\u00a0podman\u00a0) \u7684\u00a0Linux\u00a0\u670d\u52a1\u5668<\/li>\n<\/ul>\n<h2 id=\"\u5b89\u88c5\">#\u5b89\u88c5<\/h2>\n<h3 id=\"_1-\u955c\u50cf\u6e90\">#1. \u955c\u50cf\u6e90<\/h3>\n<p>\u627e\u5230\u00a0github\u00a0\u4e2d\u00a0OpenStack\u00a0\u5bf9\u5e94\u4e0e\u00a0openstack\/skyline-apiserver\u00a0\u7684\u955c\u50cf\uff0c\u5373<\/p>\n<div>\n<pre># \u5b98\u65b9https:\/\/opendev.org\/openstack\/skyline-apiserver\r\n# github \u5982\u4e0b\r\nhttps:\/\/github.com\/openstack\/skyline-apiserver<\/pre>\n<\/div>\n<h3 id=\"_2-\u4e0b\u8f7dskyline-yaml\">#2. \u4e0b\u8f7dskyline.yaml<\/h3>\n<p>\u627e\u5230\u00a0etc\/skyline.yaml.sample\uff0c\u8fd9\u4e2a\u6587\u4ef6<\/p>\n<p>\u6253\u5f00\u8fd9\u4e2a\u6587\u4ef6\u539f\u59cb\u94fe\u63a5\uff0c\u4e0b\u8f7d\u5230\u670d\u52a1\u5668\u53bb<\/p>\n<p>\u5f97\u5230\u5982\u4e0b\u94fe\u63a5<\/p>\n<div>\n<pre>https:\/\/jihulab.com\/james-curtis\/skyline-apiserver\/-\/raw\/master\/etc\/skyline.yaml.sample\r\n<\/pre>\n<\/div>\n<p>\u7136\u540e\u8f93\u5165\u4e0b\u9762\u547d\u4ee4\uff0c\u4e0b\u8f7d\u5230\u672c\u5730<\/p>\n<div>\n<pre>mkdir \/etc\/skyline\r\nwget https:\/\/jihulab.com\/james-curtis\/skyline-apiserver\/-\/raw\/master\/etc\/skyline.yaml.sample -O \/etc\/skyline\/skyline.yaml\r\n<\/pre>\n<\/div>\n<h3 id=\"_3-\u7f16\u8f91\u914d\u7f6eskyline-yaml\">#3. \u7f16\u8f91\u914d\u7f6eskyline.yaml<\/h3>\n<p>\u6839\u636e\u5b9e\u9645\u7684\u73af\u5883\u4fee\u6539\u4ee5\u4e0b\u53c2\u6570<\/p>\n<ul>\n<li>database_url \u00a0\u4fee\u6539\u4e3a\u5982\u4e0b\uff0c\u6ce8\u610f\uff1aip\u662f\u6d6e\u52a8IP\uff0cSKYLINE_DBPASS\u8fd9\u4e2a\u662f\u6570\u636e\u5e93\u7528\u6237\u5bc6\u7801\u53ef\u4ee5\u81ea\u5b9a\u4e49<\/li>\n<\/ul>\n<div>\n<pre>  database_url: mysql:\/\/skyline:SKYLINE_DBPASS@&lt;vip&gt;:3306\/skyline\r\n<\/pre>\n<\/div>\n<ul>\n<li>keystone_url \u5c06 127.0.0.1 \u4fee\u6539\u4e3a\u6d6e\u52a8IP<\/li>\n<\/ul>\n<div>\n<pre>  keystone_url: http:\/\/&lt;vip&gt;:35357\/v3\/\r\n<\/pre>\n<\/div>\n<ul>\n<li>prometheus_endpoint<\/li>\n<\/ul>\n<div>\n<pre>  prometheus_endpoint: http:\/\/&lt;vip&gt;:9091\r\n<\/pre>\n<\/div>\n<ul>\n<li>system_user_password \u8bbe\u7f6e\u4f60\u7684skyline\u5bc6\u7801<\/li>\n<\/ul>\n<div>\n<pre>  system_user_password: 'SKYLINE_PASS'\r\n<\/pre>\n<\/div>\n<h3 id=\"_4-\u914d\u7f6e\u6570\u636e\u5e93\">#4. \u914d\u7f6e\u6570\u636e\u5e93<\/h3>\n<h4 id=\"_4-1-\u521b\u5efa-skyline-\u6570\u636e\u5e93\">#4.1\u00a0\u521b\u5efa skyline \u6570\u636e\u5e93<\/h4>\n<p>\u8fdb\u5165docker\u73af\u5883\uff0c\u547d\u4ee4\uff1adocker exec -it mariadb bash<\/p>\n<div>\n<pre>root@ubuntu:~# docker exec -it mariadb bash\r\n(mariadb)[mysql@ubuntu \/]$ \r\n\r\n<\/pre>\n<\/div>\n<p>\u83b7\u53d6mariadb\u5bc6\u7801<\/p>\n<div>\n<pre>cat \/etc\/kolla\/passwords.yml | grep ^database_password\r\n<\/pre>\n<\/div>\n<p>\u8fde\u63a5mariadb\uff0c\u547d\u4ee4\uff1amysql -u root -p<\/p>\n<div>\n<pre>(mariadb)[mysql@ubuntu \/]$ mysql -u root -p\r\nEnter password: \r\nWelcome to the MariaDB monitor.  Commands end with ; or \\g.\r\nYour MariaDB connection id is 6407\r\nServer version: 10.6.11-MariaDB-1:10.6.11+maria~ubu2004-log mariadb.org binary distribution\r\n\r\nCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.\r\n\r\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\r\n\r\nMariaDB [(none)]\r\n\r\n<\/pre>\n<\/div>\n<p>\u521b\u5efa\u6570\u636e\u5e93<\/p>\n<div>\n<pre>CREATE DATABASE IF NOT EXISTS skyline DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;\r\n\r\n<\/pre>\n<\/div>\n<h4 id=\"_4-2-\u6388\u4e88\u5bf9\u6570\u636e\u5e93\u7684\u9002\u5f53\u8bbf\u95ee\u6743\u9650\">#4.2\u00a0\u6388\u4e88\u5bf9\u6570\u636e\u5e93\u7684\u9002\u5f53\u8bbf\u95ee\u6743\u9650<\/h4>\n<p>SKYLINE_DBPASS\u00a0\u662f\u6570\u636e\u5e93\u7528\u6237\u5bc6\u7801<\/p>\n<div>\n<pre>GRANT ALL PRIVILEGES ON skyline.* TO 'skyline'@'localhost' IDENTIFIED BY 'SKYLINE_DBPASS';\r\nGRANT ALL PRIVILEGES ON skyline.* TO 'skyline'@'%'  IDENTIFIED BY 'SKYLINE_DBPASS';\r\n<\/pre>\n<\/div>\n<p>\u4e4b\u540e\u63a8\u51faMariaDB\u73af\u5883\uff0c\u8f93\u5165exit<\/p>\n<p>\u518d\u9000\u51fadocker\u73af\u5883\uff0c\u8f93\u5165exit<\/p>\n<h3 id=\"_5-\u521b\u5efa-skyline-\u670d\u52a1\u51ed\u8bc1\"><a href=\"https:\/\/www.brook-w.com\/pages\/38a51d\/#_5-%E5%88%9B%E5%BB%BA-skyline-%E6%9C%8D%E5%8A%A1%E5%87%AD%E8%AF%81\">#<\/a>5.\u00a0\u521b\u5efa skyline \u670d\u52a1\u51ed\u8bc1<\/h3>\n<p>\u5982\u679c\u6ca1\u6709\u8fdb\u5165python\u865a\u62df\u73af\u5883\uff0c\u5148\u6fc0\u6d3b<\/p>\n<div>\n<pre>source \/path\/to\/venv\/bin\/activate\r\n<\/pre>\n<\/div>\n<p>\u7136\u540e\u521b\u5efa\u670d\u52a1\u51ed\u8bc1<\/p>\n<div>\n<pre>(venv) root@ubuntu:~# . \/etc\/kolla\/admin-openrc.sh\r\n(venv) root@ubuntu:~# openstack user create --domain default --password SKYLINE_PASS skyline\r\n+---------------------+----------------------------------+\r\n| Field               | Value                            |\r\n+---------------------+----------------------------------+\r\n| domain_id           | default                          |\r\n| enabled             | True                             |\r\n| id                  | cef488018dd542d9b12a6260f1413194 |\r\n| name                | skyline                          |\r\n| options             | {}                               |\r\n| password_expires_at | None                             |\r\n+---------------------+----------------------------------+\r\n(venv) root@ubuntu:~# openstack role add --project service --user skyline admin\r\n(venv) root@ubuntu:~# \r\n<\/pre>\n<\/div>\n<h3 id=\"_6-\u8fd0\u884c-skyline-bootstrap-\u5bb9\u5668\u8fdb\u884c\u521d\u59cb\u5316\u5f15\u5bfc\">#6.\u00a0\u8fd0\u884c skyline_bootstrap \u5bb9\u5668\u8fdb\u884c\u521d\u59cb\u5316\u5f15\u5bfc<\/h3>\n<p>\u8fd9\u91cc\u6ce8\u610f\u4f7f\u7528\u6e90<\/p>\n<div>\n<pre># \u5b98\u7f51\u547d\u4ee4\r\n# docker run -d --name skyline_bootstrap -e KOLLA_BOOTSTRAP=\"\" -v \/etc\/skyline\/skyline.yaml:\/etc\/skyline\/skyline.yaml --net=host 99cloud\/skyline:latest\r\n<\/pre>\n<\/div>\n<p>\u8fd9\u91cc\u6211\u4f7f\u7528\u5357\u4eac\u5927\u5b66\u7684docker hub\u6e90<\/p>\n<div>\n<pre>docker run -d --name skyline_bootstrap -e KOLLA_BOOTSTRAP=\"\" -v \/etc\/skyline\/skyline.yaml:\/etc\/skyline\/skyline.yaml --net=host docker.nju.edu.cn\/99cloud\/skyline:latest\r\n<\/pre>\n<\/div>\n<h3 id=\"_7-\u521d\u59cb\u5316\u5f15\u5bfc\u5b8c\u6210\u540e\u8fd0\u884c-skyline-\u670d\u52a1\">#7.\u00a0\u521d\u59cb\u5316\u5f15\u5bfc\u5b8c\u6210\u540e\u8fd0\u884c skyline \u670d\u52a1<\/h3>\n<p>\u5220\u9664\u5f15\u5bfc\u5bb9\u5668<\/p>\n<div>\n<pre>docker rm -f skyline_bootstrap\r\n<\/pre>\n<\/div>\n<p>\u8fd0\u884c skyline \u670d\u52a1<\/p>\n<div>\n<pre>docker run -d --name skyline --restart=always -v \/etc\/skyline\/skyline.yaml:\/etc\/skyline\/skyline.yaml --net=host docker.nju.edu.cn\/99cloud\/skyline:latest\r\n<\/pre>\n<\/div>\n<p>\u73b0\u5728\u4f60\u53ef\u4ee5\u8bbf\u95ee\u4eea\u8868\u76d8:\u00a0https:\/\/&lt;vip&gt;:9999<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5148\u51b3\u6761\u4ef6 \u4e00\u4e2a\u81f3\u5c11\u8fd0\u884c\u6838\u5fc3\u7ec4\u4ef6\u7684\u00a0OpenStack\u00a0\u73af\u5883, \u5e76\u80fd\u901a\u8fc7\u00a0Keystone endpoint\u00a0\u8bbf [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,3],"tags":[],"class_list":["post-12000","post","type-post","status-publish","format-standard","hentry","category-linux","category-system"],"_links":{"self":[{"href":"https:\/\/www.xh86.me\/index.php?rest_route=\/wp\/v2\/posts\/12000","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xh86.me\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xh86.me\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xh86.me\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xh86.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=12000"}],"version-history":[{"count":1,"href":"https:\/\/www.xh86.me\/index.php?rest_route=\/wp\/v2\/posts\/12000\/revisions"}],"predecessor-version":[{"id":12001,"href":"https:\/\/www.xh86.me\/index.php?rest_route=\/wp\/v2\/posts\/12000\/revisions\/12001"}],"wp:attachment":[{"href":"https:\/\/www.xh86.me\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12000"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xh86.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=12000"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xh86.me\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=12000"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}