Code Monkey home page Code Monkey logo

supergiant's Introduction

Supergiant: Kubernetes Orchestration

Release Widget GoDoc Widget Travis Widget Coverage Status Widget GoReportCard Widget


Empower developers and administrators through simplified deployment and management of Kubernetes. Supergiant facilitates clusters on multiple cloud providers, striving for agnostic infrastructure--with an autoscaling system that cares about efficiency. It asserts through autoscaling that every pod should have a home, but that underutilized infrastructure shouldn't be paid for (and, therefore, shouldn't be running).

Features

  • Vanilla, Certified Kubernetes, with versions 1.5 to 1.11
  • AWS, DigitalOcean, OpenStack, Packet, GCE, and on-premise kube deployment
  • Automatic, resource-based node scaling
  • A microservices architecture that allows users to customize their experience
  • Easy creation of Helm releases, Pods, Services, LoadBalancers, etc.
  • Role-based Users, Session-based logins, self-signed SSLs, and API tokens

Resources

Community and Contributing

We are grateful for any contribution to the Supergiant project, be it in the form of a GitHub issue, a Pull Request, or any social media engagement. Contributing to Supergiant requires familiarization with the Community and Contribution Guidelines. Please see these links to get started:

Development

Setup

Note: This process is under review, and will be updated. However, most of it should still be valid. Before submitting a Pull Request, please see Community and Contributing above.

1. Install Dependencies:

Note: If a new package is imported and then used in Supergiant code, make sure to vendor the imports (the govendor binary is located in $GOPATH/bin/govendor):

govendor add +external

Note: New to any of these technologies? Here are a few basic, free resources:

2. Fork the Repo

Please make sure to fork the Supergiant project before getting started. Direct Pull Requests will not be accepted into the project.

To make the commands in subsequent steps copy-pastable, feel free to do the folowing:

GITHUB_USERNAME="github_username"

3. Clone the Fork

Clone the repo into a local Go project directory, and add an upstream remote to keep the fork synced:

git clone https://github.com/$GITHUB_USERNAME/supergiant.git $GOPATH/src/github.com/supergiant/supergiant
git remote add upstream https://github.com/supergiant/supergiant.git

Remember to checkout a branch to work on, or create a new branch.

4. Setup a Config File

Note: From now on, all specified directories have a root of $GOPATH/src/github.com/supergiant/.

Copy the example configuration from within ./supergiant/, or create a custom one as desired:

cp config/config.json.example config/config.json

5. Compile UI Assets

Run this from within ./supergiant/. It was once used to run the old UI, and, although the old UI is no longer in use, it is necessary to run the backend (the binary for go-bindata is found in $GOPATH/bin/):

go-bindata -pkg bindata -o bindata/bindata.go config/providers/... ui/assets/... ui/views/...

Operation

1. Running the Backend

From within ./supergiant/, run:

go run cmd/server/server.go --config-file config/config.json

The server will output as seen below:

INFO[0000] No Admin detected, creating new and printing credentials:

  ( ͡° ͜ʖ ͡°)  USERNAME: admin  PASSWORD: 0GYB4rIU8TaokNtJ

Note: The initial account login credentials will appear like this the first time that the server runs, and will not appear again, though anyone with access to these logs can see them. The credentials can be changed.

2. Running the UI

Currently, Supergiant uses a UI developed with Angular 5 and higher. The Angular project directory is found in ./supergiant/cmd/ui/assets. The old UI is accessible on port 8080 when the Supergiant Server is running.

2.a. Install Node Modules

In ./supergiant/cmd/ui/assets, run:

npm install

Note: If the UI fails to initialize, package and dependency problems are often the cause. If there is a problem with the project's current package.json or package-lock.json, please open a GitHub issue.

2.b. Serve the UI

Within ./supergiant/cmd/ui/assets/, run:

ng serve

The UI will be accessible on port 4200 by default. The server must be running to interact properly with the UI.

Building

1. Building the Server

Note: The build processes for both the server binary and Docker image are currently under review.

2. Building the UI

Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the -prod flag for a production build.

Note: The build processes for both the UI binary and Docker image are currently under review.

Testing

1. Testing the Server

Currently, tests are split up into two groups: unit tests and integration tests. Unit tests are in ./supergiant/pkg/, and integration tests are in ./supergiant/test.

1.a. Unit Testing

To run unit tests, simply run go test on all of the Supergiant-specific packages within ./supergiant/:

go test -v ./pkg/...
1.b. Integration Testing

Note: Before running integration tests, make sure to set the required environment variables noted in the code for each provider in ./supergiant/test/providers/

For integration tests, Golang build tags are used. This helps with separation of testing concerns. The tag used is // +build integration. Like unit tests, it is easy to run the tests from ./supergiant/:

go test -v -tags=integration ./test/...

2. Testing the UI

1.a. Unit Testing

Run ng test to execute the unit tests with Karma.

1.b. E2E Testing

Run ng e2e to execute the end-to-end tests with Protractor. Before running the tests, make sure to serve the app via ng serve.

License

Copyright 2016 Qbox, Inc., a Delaware corporation. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

supergiant's People

Contributors

festivalbobcats avatar gopherstein avatar stgleb avatar saheienko avatar egopher avatar josephkane avatar theklarken avatar nikage avatar spankenstein avatar jordanrinke avatar golkir avatar alterx avatar joelgriffith avatar maikelvl avatar purplesmoke05 avatar briansage avatar eguven avatar esmevane avatar digitalsparky avatar devrsw avatar hetmanchuk avatar fastjames avatar

Watchers

James Cloos avatar  avatar  avatar

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.