顯示具有 OpenStack Dashboard 標籤的文章。 顯示所有文章
顯示具有 OpenStack Dashboard 標籤的文章。 顯示所有文章

2012年6月14日 星期四

[OpenStack] 如何透過 dashboard import keypair?

在 OpenStack dashboard 中存在一項功能 ── import keypair。

But, how to import a keypiar via dashboard 一直困擾著我!囧

經由上網發問,總算得知正確的使用方式。

因此,藉由這裡記錄在 OpenStack dashboard import keypair 的方法。

首先,什麼是 keypair?下面是 OpenStack 初學者手冊中的定義。

You will also need to generate a keypair consisting of private key/public key to be able to launch instances on OpenStack. These keys are injected into the instances to make password-less SSH access to the instance. This depends on the way the necessary tools are bundled into the images.

接下來,將說明如何操作 import keypair。

STEP 1. 在主機上建立公鑰 (public key)
# ssh-keygen

建立過程中詢問之事項皆 Enter 帶過。

STEP 2. 進入 .ssh 資料夾
# cd .ssh

將會發現資料夾中存在 id_rsa 以及 id_rsa.pub 檔案。

STEP 3. 開啟公鑰
# cat ~/.ssh/id_rsa.pub

STEP 4. 複製工要內容,並貼入 dashboard 中 public key 欄位

恭喜你,順利完成 import keypair 的艱難任務! :D

參考資料:
1. OpenStack Compute Starter Guide -Essex

2012年2月13日 星期一

[OpenStack] OpenStack Dashboard 簡介與安裝

簡介:
OpenStack Dashboard 是一個以 web 為基礎的視窗提供使用者透過 OpenStack APIs 與 OpenStack Compute 雲控制器溝通。

系統需求:
1. 必須運行 OpenStack Compute 安裝並包含 Identity 與 Keystone 服務
2. 必須知道 Identity 與 Compute 的 URL
3. 必須安裝 git
4. Python 2.6 或 2.7

安裝步驟:
1. 安裝 OpenStack Dashboard 框架,其中包含 Apache 及相關模組

sudo apt-get install -y libapache2-mod-wsgi
sudo apt-get install -y openstack-dashboard openstackx python -sqlite

2. 配置 Dashboard

2.1 開啟 mysql,並輸入 root 使用者的密碼

mysql -u root -p

2.2 配置 MySQL,建立 dash 資料庫

mysql> CREATE DATABASE dash;

2.3 建立使用者,並擁有 dash 資料庫之最高權限

mysql> GRANT ALL ON dash.* TO 'dash'@'%' IDENTIFIED BY 'yourpassword';

2.4 於 /local/local_settings.py 中修正下列選項:

● DATABASE:

DATABASES = {
      'default': {
          'ENGINE': 'django.db.backends.mysql',
          'NAME': 'dash',
          'USER': 'dash',
          'PASSWORD': 'yourpassword',
          'HOST': 'localhost',
          'default-character-set': 'utf8'
      },
  }


2.5 運行 syncdb 指令初始化資料庫

# If using Cloud Builders packages, do this:
  cd /var/lib/dash
  PYTHONPATH=/var/lib/dash/ python dashboard/manage.py syncdb

  # If using Managed IT packages, do this:
  /usr/share/openstack-dashboard/dashboard/manage.py syncdb


你將會看見下列結果輸出

Installing custom SQL ...
  Installing indexes ...
  DEBUG:django.db.backends:(0.008) CREATE INDEX `django_session_c25c2c28` ON`django_session` (`expire_date`);; args=()
  No fixtures found.


3. 重啟並運行 Apache 伺服器

sudo /etc/init.d/apache2 restart
sudo restart nova-api


如果安裝正確,打開瀏覽器並輸入 http://localhost 你將會看見 OpenStack Dashboard。