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).
- 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
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:
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.
- Git
- Go - version 1.7+
- govendor
- go-bindata
- npm & Node.js
- Angular - version 5.0+
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:
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"
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.
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
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/...
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.
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.
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.
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.
Note: The build processes for both the server binary and Docker image are currently under review.
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.
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
.
To run unit tests, simply run go test
on all of the Supergiant-specific packages within ./supergiant/
:
go test -v ./pkg/...
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/...
Run ng test
to execute the unit tests with Karma.
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
.
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.