Git Product home page Git Product logo

lxd-cloud-scheduler's Introduction

LXD Cloud Scheduler

LXD project by GO-SQUADS Tech Intern 2017

This is the setup for LXD team's project. The Vagrantfile is configured to make a web-interface VM (if ENABLE_WEB_INTERFACE is true) and a number of nodes (according to NODE_COUNT) in a DHCP private network.

The web-interface is provisioned with chef-solo to setup lxd-web-interface. The nodes are provisioned to setup and initialize LXD (feature branch) using lxd init --preseed. See Vagrantfile and preseed.yaml for more details.

It isn't fully automated yet, requiring manual configuration for:

  1. Fetching and adding node VM IP to the Ip_Addresses table of lxdwebinterface psql db.
  2. Certificate authentication for LXD API (https://NODE_IP:8443/1.0/certificates).
  3. Creating a default container image.

Installing / Getting started

Prerequesites are VirtualBox and Vagrant. To install, please run:

$ brew cask install virtualbox vagrant

If you're on Mac, you need an updated curl with a newer version of OpenSSL to authenticate a certificate to the LXD API. Please run:

$ brew install curl --with-nghttp2
$ brew link curl --force
$ echo 'export PATH="/usr/local/opt/curl/bin:$PATH"' >> ~/.zshrc

And restart your terminal.

After cloning, run this in the root of the repo:

$ vagrant up

Done! To go into the web-interface VM, run vagrant ssh web-interface. exit to get out. You can access the LXD API through through https://NODE_IP:8443/.

To authenticate certificates for LXD API, you need to:

  1. Retreive the node IP using ifconfig (inside the node VM).
  2. Gerenerate an SSL certificate, or just use one from the root of lxd-web-interface.
  3. Post the certificate with curl -k --cert client.crt --key client.key https://NODE_IP:8443/1.0/certificates -X POST -d '{"type": "client", "password": "admin"}'
  4. Now you're fully authenticated. Try curl -k --cert client.crt --key client.key https://NODE_IP:8443/1.0 -X GET.

Developing

$ git clone https://github.com/satraul/lxd-cloud-scheduler.git
$ cd lxd-cloud-scheduler/

Licensing

The code in this project is licensed under MIT license.

lxd-cloud-scheduler's People

Contributors

satraul avatar milhamdedi avatar rimara avatar taufanmahaputra avatar

Watchers

James Cloos avatar

Forkers

taufanmahaputra

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.