Giter Site home page Giter Site logo

flocx's Introduction

flocx's People

Contributors

larsks avatar okrieg avatar sahiltikale avatar tzumainn avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flocx's Issues

Configuring keystone

If you start with the tripleomaster/centos-binary-keystone Docker image, you will need to inject some configuration information into it before it will be useful:

You need to pre-recreate a user and a database in mariadb. This can done by using the MYSQL_DATABASE, MYSQL_USER, and MYSQL_PASSWORD environment variables when starting your mariadb container.

You need an /etc/keystone/keystone.conf. A minimum configuration might look like:

[DEFAULT]
debug = true
log_rotation_type = size
max_logfile_size_mb = 500
max_logfile_count = 30


[database]
# This is mysql+pymysql://<USER>:<PASSWORD>@<HOSTNAME>/<DATABASENAME>
connection = mysql+pymysql://keystone:secret@database/keystone

[token]
provider = fernet

You need to provide an Apache configuration, which will look something like:

Listen 5000

<VirtualHost *:5000>
  ServerName keystone

  ## Vhost docroot
  DocumentRoot "/var/www/cgi-bin/keystone"

  ## Directories, there should at least be a declaration for /var/www/cgi-bin/keystone

  <Directory "/var/www/cgi-bin/keystone">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Require all granted
  </Directory>

  ## Logging
  ErrorLog "/var/log/httpd/keystone_wsgi_main_error.log"
  ServerSignature Off
  CustomLog "/var/log/httpd/keystone_wsgi_main_access.log" combined 
  WSGIApplicationGroup %{GLOBAL}
  WSGIDaemonProcess keystone_main display-name=keystone-main group=keystone processes=12 threads=1 user=keystone
  WSGIProcessGroup keystone_main
  WSGIScriptAlias / "/var/www/cgi-bin/keystone/main"
  WSGIPassAuthorization On
</VirtualHost>

Lastly, you will need to ensure that the container runs the command /usr/sbin/httpd -DFOREGROUND.

What if we used JMESPATH for expressing match requirements?

JMESpath is a syntax for querying complex data. This would give us a mechanism for expressing requirements based on server properties. We can then express a requirement as a tuple (expression, operator, value). A list of such tuples represents the requirements in a bid.

  1. "I want a server with at least 32GB of memory."

    ```
    - ["memory_mb", ">=", 32000]
    ```
    
  2. "I want an x86_64 server with at least 32GB of memory and at least one disk that is larger than 200GB."

     ```
     - ["cpu_arch", "=", "x86_64"]
     - ["memory_mb", ">=", 32000]
     - ["length(inventory.disks[*]|[?size > `200000000000`])", ">", 0] 
     ```
    
  3. "I need a Dell Power Edge M620."

     ```
     - ["inventory.system_vendor.product_name", "contains", "PowerEdge M620"]
    

Substring Operation

What do you think would be the appropriate operation for substring, as "contains" & "in" are for lists. I guess, we should have in for the strings as well.

Error in match-syntax.md

Some of the example are not correct for example the JMESPath expression "system_vendor.manufacturer" isn't valid instead it should be "inventory.system_vendor.manufacturer"

Also null is not python syntax so either use None or make null a string.

First things to do for FLOCX

1st thing 1st: Create a repository of FLOCX and add whitel (username) to it, make him a member that can review and merge.

First steps to do for FLOCX

HIL-Node

  • Add another field in the Nodes object to hold information about
  • Owner: Who actually owns it.
  • Occupant: Who currently is using it.

HIL-project

  • Add a “Transfer Nodes” operation in HIL. It transfers nodes from the Tenants projects to Marketplace project and vice versa
  • Create a database for FLOCX. Design it.
  • It will control the project MarketPlace in HIL

FLOCX-Market

  • Manages credits for all projects
  • Tracks available nodes to the market
  • Tracks which nodes are allocated where

FLOCX-Market-Accounting

  • Add credits from other project use of my nodes
  • Remove credits from me using other people’s nodes
  • Add credits from outside FLOCX (Using real money eg)

FLOCX-Market-Operations

  • Transfer node from one project to another
  • Transfer node from marketplace to project
  • Transfer node from project to marketplace
  • Timer for when duration expires
  • Poll for expired duration. Use database triggers for duration expiration

Some db good practices:

  • Every row has a unique, not related to the data, id
  • Update & delete timestamps
  • Never delete rows
  • Money related operations should be idempotent (or fixable).
  • Add more money: current balance is 1000 $, add 100$, (I had 1000$ and adding 100$ to it, making it 1100$). This will capture broken transactions.
  • Alternately, use sequences and reject records that are out of sequence

Next phase Ideas:

  • After building the system using the points given up, simulate schedulers that will interact with the FLOCX marketplace.

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.