Git Product home page Git Product logo

elektra's Introduction

Build Status

Elektra

Elektra Landing Page

Elektra is an opinionated Openstack Dashboard for Operators and Consumers of Openstack Services. Its goal is to make Openstack more accessible to end-users.

To that end Elektra provides web UIs that turn operator actions into user self-services.

User self-services:

  • User onboarding
  • Project creation and configuration
  • Quota requests
  • Authorizations and access control for projects and services
  • Cost control

We have UIs for the following Openstack core services:

  • Compute: servers, server images, server snapshots (Nova)
  • Block storage: volumes, volume snapshots (Cinder)
  • User and group roles assignments (Keystone)
  • Secure key store (Barbican)
  • Software-defined networks, routers, floating IPs, security groups (Neutron)
  • Loadbalancing (Octavia LBaaS)
  • DNS (Designate)
  • Object storage (Swift)
  • Shared file storage (Manila)

Extended services:

  • SAP Automation as a Service
  • SAP Hana as a Service
  • SAP Kubernetes as a Service

Project Landing Page:

Elektra Project Screen

Where does the name come from?

In Greek mythology Elektra, the bright or brilliant one, is the Goddess of Clouds with a silver lining.

Installing and Running Elektra

Steps to setup a local development environemnt

MacOS

  1. Install postgres database (current version is 12.x).

    brew install postgresql@12
    brew link postgresql@12
    createuser -s postgres
  2. Install ruby version 2.7.6

    brew install ruby-install
    ruby-install ruby 2.7.6
  3. Install chruby to change the current ruby version (optional). This is helpful when having projects with different ruby versions.

    brew install chruby

    Ensure to implement the necessary changes in your .bashrc or .zshrc according to brew:

    https://formulae.brew.sh/formula/chruby
  4. Install nodejs if not installed. (current working version 12.22.6 but higher versions works also fine)

    brew install nodejs@12
    brew link nodejs@12
  5. Install yarn (actual version is 1.19.2 but higher works also fine)

    brew install [email protected]
  6. Clone this repository to your machine.

    git clone https://github.com/sapcc/elektra.git
  7. Install bundler Cd into elektra/ directory and run:

    gem install bundler -v 2.3.13 (check for the actual version)
  8. Compile and install elektra gems Cd into elektra/ directory and run:

    bundle install
  9. Compile and install node modules Cd into elektra/ directory and run:

    bundle exec yarn
  10. Create, migrate and seed the database Cd into elektra/ directory and run:

    bundle exec rake db:create db:migrate db:seed
  11. Copy the env.sample file to a .env file and adjust the values

    • Set the MONSOONOPENSTACK_AUTH_API* values to your devstack/openstack configuration settings
    • Enter the database configuration parameters
  12. Start the Elektra dashboard application a. Run rails puma server

    bin/rails server -p 3000

    b. Run react live compiling

    bin/yarn build --watch

    Browser access for Elektra: http://localhost:3000

Linux

  1. Clone the repository with git clone https://github.com/sapcc/elektra.git
  2. Install Yarn and PostgreSQL via package manager
  3. Check if the ruby version in your package manager matches the version number in .ruby-version. If yes then install ruby via your package manager. If no then follow the extra steps:
    1. Set up rbenv and ruby-build according to their documentation.
    2. Install Ruby with rbenv install 2.7.6 (substitute the Ruby version with the one from the aforementioned file).
  4. Install Ruby gems with bundle install.
  5. Install JavaScript packages with yarn.
  6. Create database if not already done ./testing/with-postgres-db.sh bin/rails db:prepare
  7. In one terminal or tmux, run yarn build --watch to compile the JavaScript assets. Leave this running until you're done with development.
  8. In a second terminal or tmux, run ./testing/with-postgres-db.sh bin/rails server -p 3000 to run the Ruby application. Leave this running, too.
  9. Now you can access the GUI at http://localhost:3000. When coming in from a different machine, you need to set up forwarding for ports 3000, e.g. ssh -L 3000:127.0.0.1:8180 -L 8081:127.0.0.1:8081.

After each pull, you may have to repeat steps 4-5 if the Ruby version or any package versions were changed.

NixOS notes

Step 2 and 3 should be replaced with the following commands and the nix-shell must be kept open for the steps afterwards.

nix-shell
bundle config build.sqlite3 --with-sqlite3-include="$(nix-store -r "$(nix-instantiate '<nixpkgs>' -A sqlite.dev)")/include" --with-sqlite3-lib="$(nix-store -r "$(nix-instantiate '<nixpkgs>' -A sqlite.out)"'!out')/lib"

or with nix-command enabled:

nix develop -f shell.nix
bundle config build.sqlite3 --with-sqlite3-include="$(nix eval nixpkgs#sqlite.dev)/include" --with-sqlite3-lib="$(nix eval nixpkgs#sqlite.out)/lib"

Use Elektra Request Management

  1. Create another administrator user for the Default domain with email address in Horizon or with CLI
  2. Configure MONSOON_DASHBOARD_MAIL_SERVER accordingly
  3. Restart Elektra Application

Available Services in Elektra

If elektra is configured against a standard DevStack installation, only the core services like identity, nova, neutron and cinder are (sometimes partly) available and shown in Elektra. Additional services like swift, LBaaS, manila, ... will only be shown when available from the DevStack backend side.

Create a new Plugin

For more information about plugins, see the chapter "What are Plugins?" below.

The complexity of a plugin may vary greatly depending on its purpose. For example a Lib Plugin includes no app tree and is not mountable. However, it contains a lib folder and therefore implements libraries which may be used in other plugins. The next complexity level is the ServiceLayer Plugin, which already contains a partial app tree but isn't mountable and doesn't define views, it offers a service or library which may be used in other plugins (the Core::ServiceLayer is an example of such a plugin). The last plugin type is the mountable plugin which includes a full app tree and its own routes and views and is able to be mounted and act as an isolated rails app (The network plugin is an example of a mountable plugin).

  • Lib Plugin
    • includes a "lib" directory and no app tree
  • ServiceLayer Plugin
    • includes an implementation of ServiceLayer and DomainModel
    • app tree partially available
    • is a Rails Engine
  • Mountable Plugin
    • includes a full app tree
    • can be mounted and define own routes
    • is a Rails Engine

For ease-of-use we have provided a generator which generates a skeleton plugin folder structure with the necessary elements and some basic classes with the proper inheritance to get started. First decide which type of plugin you want to start developing (for more infos about plugins see "What are Plugins?" below):

Create Lib Plugin

cd [Elektra root]

bin/generate dashboard_plugin NAME

Create ServiceLayer Plugin

cd [Elektra root]

bin/generate dashboard_plugin NAME --service_layer

Create Mountable Plugin

cd [Elektra root]

bin/generate dashboard_plugin NAME --mountable

Create Mountable ServiceLayer-Plugin

cd [Elektra root]

bin/generate dashboard_plugin NAME --mountable --service_layer

Create React Plugin

cd [Elektra root]

bin/generate dashboard_plugin NAME --react

For more information use: bin/generate dashboard_plugin --help

Creating Migrations

If your plugin needs to save things in the Elektra database, you'll need to create a migration. Migrations and the models they belong to live within the plugin. One additional step is necessary to register your migration with the host app so that it is applied when rake db:migrate is called in the host app. To create a new migration in your plugin do the following:

Background: you have a plugin named my_plugin.

  1. cd [Elektra root]/plugins/my_plugin

    Inside this (mountable) plugin you will find a bin folder and rails script within this folder.

  2. bin/generate migration entries

    A new migration was generated under plugins/my_plugin/db/migrations/

  3. Register this engine's migration for the global rake task

    initializer 'my_plugin.append_migrations' do |app|
      unless app.root.to_s == root.to_s
        config.paths["db/migrate"].expanded.each do |path|
          app.config.paths["db/migrate"].push(path)
        end
      end
    end
  4. cd [Elektra root]

    rake db:migrate

Plugin Assets

The Elektra UI design is a theme for Twitter Bootstrap (v3.~). All components described in the Twitter Bootstrap documentation also work in Elektra. Additionally we have added some components of our own. We have included Font Awesome for icons.

Important: When building views for your plugin please check existing plugins for established best practices and patterns and also check with the core team so that the user experience stays the same or similar across plugins.

In many cases the provided styles will be enough to build your views. If you need extra styles or scripts please coordinate with the core team to see whether we should include them in the core styles so they become accessible for everybody or whether they should remain specific to your plugin. Assets that are specific to your plugin must be located in the assets folder in your plugin.

What are Plugins?

Dashboard-Plugins

The concept of plugins aims to outsource parts of Elektra, thus enabling developers to work decoupled from the main app and from each other. Rather than putting everything in the "app" directory of the main app, the controllers, views and models are split into plugins. An Elektra plugin encapsulates functionality which belongs together conceptually and/or technically and which is to be integrated into Elektra for consumption by the end user. The network plugin for example contains all the necessary controllers and views as well as helper classes to create, edit and delete network objects.

The core app provides layout, user and token handling, manages the plugins and offers classes that can be extended by plugins to make use of the functionality they provide. For example, checking whether the user is registered or logged in and the logic for the rescoping is implemented in the DashboardController in the core app. Plugin controllers can inherit from this class and won't have to worry about user management themselves.

Furthermore, the core app provides a service layer through which plugins are able to access other plugins' service methods on the controller level.

Service Layer

In principle an Elektra plugin is able to store data in the Elektra database and to access it via the ActiveRecord layer. However, many plugins communicate via an API with services which persist the necessary data themselves. Elektra plugins use the Service Layer to communicate with these backend services. Services in this case are primarily OpenStack services like compute or identity. Though other custom services can also be accessed the same way by the plugin.

Important: The communication with such services requires a valid user token (OpenStack Keystone).

As described above, the DashboardController in the core app takes care of user authentication. Each plugin controller that inherits from this controller automatically includes a reference to current_user which represents the token. The plugin can now use the information in current_user (mainly the token) to interact with the backend services.

But how can a plugin, for example the compute plugin, access the network methods which are implemented in the network plugin? This is where the service layer comes into play. The DashboardController offers a method called services which contains the reference to all available plugin backend services. For example: services.networking.networks invokes the method networks from the network backend service. Thus, the Service Layer represents a communication channel to the main backend service a plugin consumes and also to the other plugin backend services.

Before you consume other backend services: Check how expensive a backend call is. If it is expensive take steps to reduce how often the call is made (e.g. by caching, displaying the information on a view that isn't accessed very often) or at least make the call asynchronously so as to not block the rest of the page from loading.

Driver Layer and Domain Model

To avoid services having to communicate directly with the API and each plugin having to implement its own client, we introduced a driver layer. This layer is located exactly between the service and the API client. Thereby it is possible to abstract the services from the specific client implementation. The driver implements methods that send or receive data to or from the API and are invoked directly by a service. The data format between service and driver is limited to the Ruby Hash. Hashes are in principle sufficient for further processing, but in the UI data is usually collected via HTML forms and must be validated before it is sent on to the API. Furthermore you often require helper methods that are not implemented in the hashes.

The mentioned drawbacks of pure hash use are eliminated by the concept of the Domain Model. The Domain Model wraps the data hash and implements methods that work on this hash. By inheriting from the core Domain Model (Core::ServiceLayer::Model) your model gets CRUD operations out of the box. You can then add additional methods for formatting, processing, etc.

Services call driver methods and map the responses to Domain Model objects and, conversely, the Domain Model objects are converted to hashes when they reach the driver layer. As a result, it is possible to work with real ruby objects in plugins rather than using hashes. In such Domain Model objects we can use validations and define helper methods.

Plugin Folder Structure

The following diagram illustrates how plugins are structured and which core classes to inherit to make it all work as described above. Plugins

Click here for a detailed class diagram

Adding gem dependencies with native extensions

The Elektra Docker image does not contain the build chain for compiling ruby extensions. Gems which contain native extensions need to be pre-built and packaged as alpine packages (apk).

Audit Log

Each controller which inherits from DashboardController provides access to audit log via audit_logger. Internally this logger uses the Rails logger and thus the existing log infrastructure.

How to use Audit Logger

audit_logger.info("user johndoe has deleted project 54353454353455435345")
# => [AUDIT LOG] user johndoe has deleted project 54353454353455435345
audit_logger.info(current_user, "has deleted project", @project_id)
# => [AUDIT LOG] CurrentUserWrapper johndoe (7ebe1bbd17b36c685389c29bd861d8c337d70a2f56022f80b71a5a13852e6f96) has deleted project JohnProject (adac5c36277b4346bbd631811af533f3)
audit_logger.info(user: johndoe, has: "deleted", project: "54353454353455435345")
# => [AUDIT LOG] user johndoe has deleted project 54353454353455435345
audit_logger.info("user johndoe", "has deleted", "project 54353454353455435345")
# => [AUDIT LOG] user johndoe has deleted project 54353454353455435345

Available Methods

  • audit_logger.info
  • audit_logger.warn
  • audit_logger.error
  • audit_logger.debug
  • audit_logger.fatal

Catch Errors in Controller

The Elektra ApplicationController provides a class method which allows the catching of errors and will render a well designed error page.

rescue_and_render_exception_page [
  { "Excon::Error" => { title: 'Backend Service Error', description: 'Api Error', details: -> e {e.backtrace.join("\n")}}},
  { "Fog::OpenStack::Errors::ServiceError" => { title: 'Backend Service Error' }},
  "Core::ServiceLayer::Errors::ApiError"
]

Errors that are caught in this way, are rendered within the application layout so that the navigation remains visible. For example if a service is unavailable the user gets to see an error but she can still navigate to other services.

rescue_and_render_exception_page accepts an array of hashes and/or strings. In case you want to overwrite the rendered attributes you should provide a hash with a mapping.

Available attributes:

  • title (error title)
  • description (error message)
  • details (some details like backtrace)
  • exception_id (default is request uuid)
  • warning (default false. If true a warning page is rendered instead of error page)

Display Quota Data

If the variable @quota_data is set the view will display all data inside this variable.

How to set @quota_data

This will load quota data from the database and update the usage attribute.

@quota_data = services.resource_management.quota_data(
  current_user.domain_id || current_user.project_domain_id,
  current_user.project_id,[
  {service_type: 'compute', resource_name: 'instances', usage: @instances.length},
  {service_type: 'compute', resource_name: 'cores', usage: cores},
  {service_type: 'compute', resource_name: 'ram', usage: ram}
])

Same example but without updating the usage attribute. It just loads the values from the database. Note that the database is not always up to date.

@quota_data = services.resource_management.quota_data(
  current_user.domain_id || current_user.project_domain_id,
  current_user.project_id,[
  {service_type: 'compute', resource_name: 'instances'},
  {service_type: 'compute', resource_name: 'cores'},
  {service_type: 'compute', resource_name: 'ram'}
])

Pagination

Controller

@images = paginatable(per_page: 15) do |pagination_options|
  services.image.images({sort_key: 'name', visibility: @visibility}.merge(pagination_options))
end

View

= render_paginatable(@images)

Mailer

From 19.08.2022 Elektra is using our own email service (Cronus) to send emails when users must be notified. This is the case for example when managing quota requests or creating new projects. Refer to config/mailer.md for details on how the mailer is setup.

Contributing

Please read CONTRIBUTING.md for details and the process for submitting pull requests to us.

Tailwind CSS Support

We use esbuild to build javascript bundles. In /app/javascript/essentials.js (which is referenced in the layout files) we import /app/javascript/tailwind.css file. This file also imports styles from juno-ui-components to use the juno color variables.

@import "https://assets.juno.qa-de-1.cloud.sap/libs/juno-ui-components@latest/build/styles.css";

elektra's People

Contributors

andypf avatar artherd42 avatar artiereus avatar auhlig avatar bozinsky avatar bugroger avatar carthaca avatar databus23 avatar dependabot[bot] avatar edda avatar fwiesel avatar galkindmitrii avatar hgw77 avatar hodanoori avatar kayrus avatar kuckkuck avatar majewsky avatar notandy avatar rajivmucheli avatar reimannf avatar renovate-bot avatar renovate[bot] avatar richardtief avatar sirajudheenam avatar stanislav-zaprudskiy avatar stefanhipfel avatar supersandro2000 avatar tlesmann avatar urfuwo avatar voigts avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

elektra's Issues

Resource Management: Template error in cloud admin view

User get error when trying to edit the capacity in cloud_admin view

ActionView::Template::Error in plugins/resource_management
NoMethodError
undefined method `inquiries_url'

plugins/resource_management/app/views/resource_management/cloud_admin/edit_capacity.html.haml at line 23

i read elektra readme ,

i read elektra readme ,
its said have these features:
Extended services:
SAP Automation as a Service
SAP Hana as a Service
SAP Kubernetes as a Service

is it work for me after install elektara ? or its private repository ? how i can access to that?

Project domain name is hard-coded

Currently the project's domain-name cloud.sap is hard-coded in the project, for example:

data = /.+\.(?<region>[^\.]+)\.cloud\.sap/.match(auth_url)

To improve the project's portability the domain name should be made configurable through an environment variable or config file.

Service User Authentication Error

Elecktra is not able to authenticate service user. I have update the .env file

I have Keystone v3 enabled in Openstack.

[root@cloud-1 ~(keystone_admin)]# openstack endpoint list |grep identity
| 6544514f28124c80a1e2ef684cfbb41e | us-west-a | keystone | identity | True | internal | http://10.9.80.50:5000/v3 |
| c453c546636e404f8f251bab82e49c2f | us-west-a | keystone | identity | True | public | http://10.9.80.50:5000/v3 |
| e51b95358a9f4d64b45573e50d62455b | us-west-a | keystone | identity | True | admin | http://10.9.80.50:35357/v3 |
[root@cloud-1 ~(keystone_admin)]#

MONSOON_OPENSTACK_AUTH_API_ENDPOINT=http://10.9.80.50:5000/v3/auth/tokens
MONSOON_OPENSTACK_AUTH_API_USERID=admin
MONSOON_OPENSTACK_AUTH_API_PASSWORD=123456789
MONSOON_OPENSTACK_AUTH_API_DOMAIN=default

when I login to Elektra UI I am getting below error

Service User Authentication Error
The request you have made requires authentication. (user_id: admin, domain: default, scope: {:domain=>{:name=>"Default"}})

When I click on Login I am able to login with the admin user however on the home it shows same above Service User Authentication Error .
elektra1

Keystone.log

2017-02-18 18:29:33.035 4954 INFO keystone.common.wsgi [req-bdcb46e2-e8a3-4309-b9a2-998d51c9843c - - - - -] POST http://10.9.80.50:5000/v3/auth/tokens
2017-02-18 18:29:33.206 4954 WARNING keystone.common.wsgi [req-bdcb46e2-e8a3-4309-b9a2-998d51c9843c - - - - -] Authorization failed. The request you have made requires authentication. from 10.9.60.210

screenshot attached .
elektra

Project lookup by friendly ID

Often times we only have a project's elektra URL which contains a friendly id slug that often doesn't match the actual name if people use URL unfriendly characters in their project names.

To make it easier to find the project in question we need a lookup by friendly ID slug which prints the project's real name and ID.

The private subnetwork selector is confusing

When creating a new router one has to select a private network subnet.
That interface is confusing. It looks more like an information and not like something one must select.
Maybe using something signaling that a user action is necessary, e.g. a checkbox or a dropdown would be better.
image

Uncaught exception after removing MONSOON3_DOMAIN_USERS group from project

Bug report: I accidentally assigned MONSOON3_DOMAIN_USERS instead of admins to my project when i removed them again Elektra first blocked for 1min or so. then I got an error.
I couldn't do anything with the project anymore. every click sent me to the sentry feedback screen. After a while it came back and I got sent to the login screen...

Better handling if object not found

We regularly get exceptions that happen because an object we don't expect to be nil is nil (likely because the backend call to retrieve the object is too slow). In these cases the user should get a nice message rather than an exception.

Usually this happens in the edit case or if some action is performed on an existing object.

Found cases:

  • instance edit
  • volume edit
  • image sorting for instance new form
  • security group show

After sign in demo user, bad URI(is not URI?)

I access localhost:3000/Default
After sign in use demo, redirect to Default/home, the page error show:

URI::InvalidURIError in Identity::DomainsController#show

`bad URI(is not URI?): [{"region_id"=>"RegionOne", "url"=>"http://10.211.xx.xx:35357/v3", "region"=>"RegionOne", "interface"=>"admin", "id"=>"9d15f97a033e4b3999cef263e695f826"}, {"region_id"=>"RegionOne", "url"=>"http://10.211.xx.xx:5000/v3", "region"=>"RegionOne", "interface"=>"internal", "id"=>"af6fcbed74344f08bd6f7bdbc5db4514"}, {"region_id"=>"RegionOne", "url"=>"http://10.211.xx.xx:5000/v3", "region"=>"RegionOne", "interface"=>"public", "id"=>"b71fb2ab726344768e880b7f7b884199"}]

the error point is Service.new(api_client.send(name) in lib/core/api/client_wrapper.rb
the name variable is identity.

my terminal show me:

FriendlyIdEntry Load (0.8ms)  SELECT  "friendly_id_entries".* FROM "friendly_id_entries" WHERE (class_name='Domain' and (lower(key)='default' or lower(slug)='default') and endpoint='http://10.211.55.27:5000/v3/auth/tokens' ) ORDER BY "friendly_id_entries"."id" ASC LIMIT $1  [["LIMIT", 1]]
17:19:42 rails.1 |   CACHE FriendlyIdEntry Load (0.0ms)  SELECT  "friendly_id_entries".* FROM "friendly_id_entries" WHERE (class_name='Domain' and (lower(key)='default' or lower(slug)='default') and endpoint='http://10.211.55.27:5000/v3/auth/tokens' ) ORDER BY "friendly_id_entries"."id" ASC LIMIT $1  [["LIMIT", 1]]
17:19:42 rails.1 | Completed 500 Internal Server Error in 96ms (ActiveRecord: 3.2ms)
17:19:42 rails.1 | 
17:19:42 rails.1 | 
17:19:42 rails.1 | bad URI(is not URI?): [{"region_id"=>"RegionOne", "url"=>"http://10.211.xx.xx:35357/v3", "region"=>"RegionOne", "interface"=>"admin", "id"=>"9d15f97a033e4b3999cef263e695f826"}, {"region_id"=>"RegionOne", "url"=>"http://10.211.xx.xx:5000/v3", "region"=>"RegionOne", "interface"=>"internal", "id"=>"af6fcbed74344f08bd6f7bdbc5db4514"}, {"region_id"=>"RegionOne", "url"=>"http://10.211.xx.xx:5000/v3", "region"=>"RegionOne", "interface"=>"public", "id"=>"b71fb2ab726344768e880b7f7b884199"}] excluded from capture: DSN not set
17:19:42 rails.1 |   
17:19:42 rails.1 | URI::InvalidURIError (bad URI(is not URI?): [{"region_id"=>"RegionOne", "url"=>"http://10.211.xx.xx:35357/v3", "region"=>"RegionOne", "interface"=>"admin", "id"=>"9d15f97a033e4b3999cef263e695f826"}, {"region_id"=>"RegionOne", "url"=>"http://10.211.xx.xx:5000/v3", "region"=>"RegionOne", "interface"=>"internal", "id"=>"af6fcbed74344f08bd6f7bdbc5db4514"}, {"region_id"=>"RegionOne", "url"=>"http://10.211.xx.xx:5000/v3", "region"=>"RegionOne", "interface"=>"public", "id"=>"b71fb2ab726344768e880b7f7b884199"}]):
17:19:42 rails.1 |   
17:19:42 rails.1 | lib/core/api/client_wrapper.rb:151:in `block (3 levels) in initialize'

my .env file content is:

POSTGRES_SERVICE_HOST=localhost
POSTGRES_SERVICE_PORT=5432

# Rails development port
PORT=3000

MONSOON_DB_USER=dashboard
MONSOON_DB_PASSWORD=dashboard

# Devstack standard admin user/pw settings used for elektra service user
MONSOON_OPENSTACK_AUTH_API_ENDPOINT=http://10.211.xx.xx:5000/v3/auth/tokens
MONSOON_OPENSTACK_AUTH_API_USERID=admin
MONSOON_OPENSTACK_AUTH_API_PASSWORD=secret
MONSOON_OPENSTACK_AUTH_API_DOMAIN=Default
# openstack service endpoint interface, default internal (for local development you most likely need to set this to public)
DEFAULT_SERVICE_INTERFACE=public

other options is default by env.sample


the url access no error for http://10.211.xx.xx:35357/v3 and http://10.211.xx.xx:5000/v3
openstack edtion is mitaka

Can you tell me how i should fix the probliem, thanks.

Create changelog for Elektra

Implement an autogeneratable changelog that is easier readable and more condensed than the commit history for others to track what we have been working on.

Idea: A changelog that can be generated from the information in git/github

Add health routes to the prometheus metric exporter

With rails5 upgrade it is not necessary to have the healthcheck middleware anymore. Rewrite those checks and add them to the prometheus exporter to be used in new grafana dashboards

Liveness and Readiness check can be written from same controller having in the readiness action a Modell call to check if the database is still up and running.

Tasks:

  • Remove middleware healthcheck
  • Write both healthchecks from the same controller. Add a model call just for the readiness check.
  • Add healthcheck calls to the prometheus exporter

project request workflow is broken when cost control service is used

Consider a situation where the sapcc-billing backend service is available. A user logs on and wants to request a new project. This action happens in the domain scope, where Keystone does not deliver a service catalog. Therefore, services.cost_control.available? is false and the project request form (and thus, the project request) will not contain the form fields for specifying a cost object.

This leads to funny crashes when the domain admin tries to approve the request, because the dialog gets confused over cost control being enabled on the one side, but the request not containing any cost object data on the other side.

There are two questions in here:

  1. How can we rewrite services.cost_control.available? such that it gives the correct result when the project request wizard is rendered?
  2. When the request is approved, the dashboard seems to understand that cost control is enabled (as evidenced by it trying, and failing, to access the cost object metadata in the request). But that workflow also happens in domain scope, where services.cost_control.available? should give the same, wrong result. How does that work? (Maybe it just doesn't check the service availability at all?)

Since this breaks the project request workflow for customers, it would be nice if someone could look into this soon.

Target audience not apparent from project page

What is not apparent from the project page is wether Elektra is geared towards public or private clouds.

My initial thought was that Elektra was a drop-in replacement for Horizon, Horizon being geared towards public clouds with support for tenants and domains. Now having spent a little time setting-up Elektra with OpenStack Ansible it seems to me Elektra is geared towards private clouds. The default domain, API credentials requirements during setup, etc.

Volumes: Reset status policy is wrong

Reset status on a volume requires "admin" role, even if the user has cinder_admin. This is an indication that the policy doesn't have a rule for this action and falls back to the default policy.

Admin Service: Find projects by floating IP or DNS record

Implement a service for admins that allows an input of floating IP or DNS record. The service should then find which project the input belongs to and display the following information about the project:

  • Project domain
  • Project name
  • Project ID
  • List of users with the role admin

Additionally retrieve some information about the object the floating IP or DNS record is attached to:

  • Type of object (server, load balancer, ...)
  • Name
  • Backend information (e.g. building block or vcenter info, ...)

The service shall be available (via link) from the domain start page and only visible/useable by users with the new security_ops role (already available in staging).

There is already a branch (reverse-lookup) where I did some initial work before deciding that this was too cumbersome to do in rails and that it needed to be a react app. The code is in the lookup plugin under reverse_lookup (controller and views)

For the user lists my idea was to get users with the role and then separately get groups with the role and make the groups expandable (so the users in the group are only loaded if the group is expanded).

Compute: Create server with a predefined fixed IP

Currently when we create a server it gets a fixed IP assigned via DHCP. Some customers would like to choose a specific fixed IP for a new server.

In order for this to work we'll need to offer the ability to create ports with a specific fixed IP. Then at a later stage when creating a new server we offer the ability to use DHCP (default) or choose from the previously created ports.

hi dude developerS

i was looking elektra travis,
what meaning "# Not yet implemented" ?
what things Not yet implemented?

2017-11-13_12-33-09

thanks

Unsupported Domain notification

I’m trying to figure out how to implement Elektra with OpenStack Ansible instead of DevStack. I keep getting an Unsupported Domain notification in the view.

Sidenote: Keystone v3 is active and I have an admin user with a Default domain and a RegionOne region in OpenStack.

Could you try and help me out getting this to work? Thanks in advance.

Screenshot:
screenshot 2017-09-05 02 17 43

Manila: Error Handling

When I'm out of Quota in Manila Shared File System Storage I expect a proper error to be shown.
But the create share dialog simply hangs without any indication.

Networking: Rework Router UI

The router UI needs some love. Some actions aren't possible from Elektra (e.g. removing internal interfaces) and are not named the way they are named in OpenStack.

Investigate what we should support and redesign the UI accordingly. Might be worth to separate the actions to add/remove the internal interfaces on the subnets from adding/removing the gateway interface on the FIP/External network.

server port with multiple fixed IPs

usecase with multiple fixed IPs at the same port on a server and thus the same mac address is not displayed + handled correctly. UI shows only one IP out of many

please fix the testcase I added for this in b162a08, my quick poor commented fix, that would handle at least the 'show' will most likely not be enough for add/remove FIP

create a UI for the reservation of Fixed IPs

Some customers are using CLI to first create a port with an IP and then boot an instance with that port id.
This makes sure a server of type X always gets the same private IP.

That should be implemented on the UI.

When creating a server the default security group is always assigned

The security group that is chosen on instance creation isn't assigned. Instead the server gets the default security group.

TEST CASE:

  1. Logon to cc3test / admin project in qa-de-1
  2. Create a cirros vm with security group datapath_ingress_all
  3. Check security group on server details screen

EXPECTED BEHAVIOUR:

datapath_ingress_all ALLOW IPv4 Any Any to 0.0.0.0/0ALLOW IPv6 Any Any to ::/0ALLOW IPv4 tcp 1-65535 from 0.0.0.0/0

OBSERVED BEHAVIOUR:

default ALLOW IPv4 Any Any from defaultALLOW IPv4 Any Any to 0.0.0.0/0ALLOW IPv6 Any Any from defaultALLOW IPv6 Any Any to ::/0

Same issue is observed in eu-nl-1. Cannot access server!

Unsupported Domain

Using a DevStack installation at commit e08f45f77f73392b2524992d8ca6c4e628400bcc in * branch stable/mitaka

Dashboard is not enabled for this domain.

Error ID: 0d29e012-3744-4012-9ecf-4bbf3b2a062e
Show error details 

Could not authenticate service user. Please check permissions on default for service user admin

screen shot 2016-11-16 at 1 08 34 pm

I've verified that I can login with the admin credentials via:

curl -i \
  -H "Content-Type: application/json" \
  -d '
{ "auth": {
    "identity": {
      "methods": ["password"],
      "password": {
        "user": {
          "name": "admin",
          "domain": { "id": "default" },
          "password": "*********"
        }
      }
    }
  }
}' \
  http://localhost:5000/v3/auth/tokens ; echo

Server create with subnet

I get the error "Please select at a network" (please fix the grammar too) when creating a server, if I have selected a network + subnet, but no fixed IP

It works if I don't select a subnet, but that is not very intuitive.

[Monsoon Openstack Auth] login_form_user -> failed. The resource could not be found.

When I configure the .env file, foreman start run the project, visit localhost: 3000/Default, enter the login page, enter the horizon existing account, prompt
[Monsoon Openstack Auth] login_form_user -> failed. (http://10.211.xx.xx/identity/auth/tokens): The resource could not be found.
The "user" and "demo" account login is not up. horizon login success.

my .env config file is
# Devstack standard admin user/pw settings used for elektra service user MONSOON_OPENSTACK_AUTH_API_ENDPOINT=http://10.211.xx.xx/identity/v3/auth/tokens MONSOON_OPENSTACK_AUTH_API_USERID=admin MONSOON_OPENSTACK_AUTH_API_PASSWORD=secret MONSOON_OPENSTACK_AUTH_API_DOMAIN=Default DEFAULT_SERVICE_INTERFACE=public
openstack is build by devstack on ubuntu16.04.
I have used “http://10.211.xx.xx/identity/v3/auth/tokens” to test the keystone api, succeeded. the url from xxx.xxx.xxx.xxx/indentify.
The "admin" user is admin role.

thanks.

Ports UI enhancements

Unify ports and fixed IP UI. Add possibility to delete ports.

Fixed IP reservations are ports with a fixed IP that haven't been attached to anything yet. In order to make this clearer to the user we'll unify the ports and fixed IP reservation UIs.

Shared Images with Glance Ocata (or later)

The Ocata release of Glance changed the meaning of the visibility attribute as specified here: https://wiki.openstack.org/wiki/Glance-v2-community-image-visibility-design
This can be identified by the minor version of the API being 2.5 or later.

It breaks a bit our UI on images, as it expects all "shared" images to be offered images which can be accepted, and that "private" images can be shared.

By default, the image resulting of a snapshot of an instance will have the "shared" visibility, meaning it can be shared to others.

In order to roll out the Queens release (currently deployed in staging), it would be good adopt the UI to the new visibility semantics.

SSO not working for customers

According to some customers SSO for them is not working, neither on windows nor on mac. After they choose a certificate they still have to enter their user/pw.
Further testing on QA showed this happens for users that have no domain-role-assignment.
Apparently elektra tries to issue a domain-scoped (SSO) authentication, that fails for 'normal' users because of lacking role-assignments.
The SSO auth should be 'unscoped' (or at least only scoped to projects/domains where a user has role-assignments for) to fix it.

Compute: Nova reset state for servers

Add a 'reset state' option to servers.

Reset state is an action on a compute server, possible target states are 'active' and 'error' (see http://developer.openstack.org/api-ref/compute/?expanded=reset-server-state-os-resetstate-action-detail#reset-server-state-os-resetstate-action)

role needed: compute_admin (requires nova policy change)

This needs some documentation for end-users as to when it makes sense to use. Example:

user turned off instance on console (without nova knowing) and triggered a reboot leaving instance in error
solution: reset state to active, nova stop, nova start

Compute: Server groups

Server groups are affinity groups for servers which determine where (availability zone) a server will be spawned in relation to other servers in the same group.

  1. Show for a server which server groups it belongs to and which rule is applied (affinity / anti-affinity)

  2. Add a new server groups UI that allows CRUD for server groups

Compute: Instance lock/unlock

Add option to lock/unlock an instance. Locking an instance prevents any action on it.

Only allowed for compute_admins (this requires a change to the nova policy)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.