+ All Categories
Home > Technology > Introduction openstack horizon

Introduction openstack horizon

Date post: 02-Jul-2015
Category:
Upload: chang-ching-yeh
View: 433 times
Download: 0 times
Share this document with a friend
Description:
Introduction openstack horizon
30
Introduction Openstack Horizon Jim
Transcript
Page 1: Introduction openstack horizon

Introduction Openstack Horizon

Jim

Page 2: Introduction openstack horizon

About

I am Jim.

A web developer.

Interested in automation

Page 3: Introduction openstack horizon

Outline

Packages

Create a dashboard

Page 4: Introduction openstack horizon

What is Horizon?

A dashboard for managing Openstack Services

Powered by Django

Page 5: Introduction openstack horizon

Key Packages

openstack_dashboard

horizon

openstack_auth

openstack/horizon

openstack/django_openstack_auth

Page 6: Introduction openstack horizon

openstack_auth

A Django authentication backend

Form a User object after an identity is verified by Keystone

Define permission instantly according to the role of a user

No database

Page 7: Introduction openstack horizon

horizonDefine a singleton of Horizon

Provide all base components that are used in dashboard

table

workflow

form

tab

Page 8: Introduction openstack horizon

openstack_dashboard

The actual django project for Horizon

dashboards and panels

api

Page 9: Introduction openstack horizon

Dashaboard

Dashaboard

DashaboardRegister

urls

Horizon App

Discover urls from dashboards

class Dashboardclass Panel

horizon openstack_dashboard(django project)

urls.py

Page 10: Introduction openstack horizon

horizon

Page 11: Introduction openstack horizon

horizon.base

Core of horizon app

Class of Dashboard and Panel

manage urls for registered dashboards and panels

Page 12: Introduction openstack horizon

Flow of a View

View Class - Handle request, collect data for component

Component Class - Render

View Class Component Class

Request Data

RenderResponse

Page 13: Introduction openstack horizon

horizon.tables

The most commonly-used component in Horizon

Every element in a table is a class

Page 14: Introduction openstack horizon

Components of a table

Table

Row

Column

Cell

Actions

Page 15: Introduction openstack horizon

horizon.workflowIt’s a form with multiple step

There are four classes in a workflow:

Workflow

Step

Action

WorkflowView

Modal

Step

Form

Page 16: Introduction openstack horizon

openstack_dashboard

Page 17: Introduction openstack horizon

openstack_dashboard.api

Wrapper for openstack-xxxxclient

Page 18: Introduction openstack horizon

openstack_dashboard.dashboards

Page 19: Introduction openstack horizon

Default Dashboard

Project

Admin

Identity (Move out from Admin)

Page 20: Introduction openstack horizon

How to Hack

Ubuntu / MacOS

A controller server (keystone, glance, nova)

Page 21: Introduction openstack horizon

Setup Environment

Page 22: Introduction openstack horizon

1.Clone the source code

2.Create a virtual environment (Optional)

3.Install pip requirements

4.Copy and update local_settings.py

Page 23: Introduction openstack horizon

Update local_settings.py

OPENSTACK_HOST = “controller"

Page 24: Introduction openstack horizon

Create a dashboard

python manage.py startdash mydashboard --target openstack_dashboard/dashboards/mydashboard

Page 25: Introduction openstack horizon

Create a panel

python manage.py startpanel mypanel --dashboard=openstack_dashboard.dashboards.mydashboard --target=openstack_dashboard/dashboards/mydashboard/mypanel

Page 26: Introduction openstack horizon

Add to enabled

Add a config file in openstack_dashboard/enabled

openstack_dashboard/enabled/mydashboard.py

Page 27: Introduction openstack horizon

Set the default panel

Add default panel

Page 28: Introduction openstack horizon
Page 29: Introduction openstack horizon

Hack

Page 30: Introduction openstack horizon

Q & A


Recommended