https://github.com/cbsd/nubectl
Cloud control utility for human beings
https://github.com/cbsd/nubectl
Last synced: 6 months ago
JSON representation
Cloud control utility for human beings
- Host: GitHub
- URL: https://github.com/cbsd/nubectl
- Owner: cbsd
- License: bsd-2-clause
- Created: 2023-12-17T19:04:57.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-17T20:23:15.000Z (over 2 years ago)
- Last Synced: 2024-03-26T05:03:56.216Z (over 2 years ago)
- Language: Go
- Size: 8.79 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Simple cloud control utility
*Yet he commanded the skies above...*
## Installation
Download the repo, compile the code for your platform.
```bash
$ git clone https://github.com/cbsd/nubectl
$ cd nubectl
$ ./build.sh
$ mv nubectl/nubectl /usr/local/bin/nubectl
```
Alternatively, to install to $GOPATH:
```bash
$ go install github.com/cbsd/nubectl@latest
```
## Usage
**nubectl** can be used with any CBSD-based platform (ClonOS, MyBee, CBSD+API), self-hosted, cloud-hosted or both
### with on-premise [CBSD](https://github.com/cbsd/cbsd) cluster
via env(1):
```bash
$ export CLOUD_URL="https://your-cbsd-api.endpoint.com"
$ export CLOUD_KEY="/path/to/your/ssh/key.pub"
$ export CLOUD_SSH="/path/to/your/ssh/id_ed2559" # (optional, for SSH only )
$ nubectl --help
```
via args:
```bash
$ nubectl --cloud_url https://your-cbsd-api.endpoint.com --cloud_key /path/to/your/ssh/key.pub
$ nubectl -cloud_url=https://your-cbsd-api.endpoint.com -cloud_key=/path/to/your/ssh/key.pub
```
### Create VM or container
```bash
$ nubectl create vm test1
$ nubectl create container test2
$ nubectl status
$ nubectl list test1
$ nubectl ssh test1
$ nubectl destroy test1
```
### Infrastructure as a Code
Configure CLI
```bash
$ export CLOUD_KEY="/path/to/your/ssh/key.pub"
```
Create `config.yaml` file in `$PWD`. Refer to [example cloud config](dist.cloud.yaml)
```yaml
version: alfa
vm:
- name: nodejsapp
cpu: 1
ram: 2g
disksize: 10g
image: centos7
container:
- name: balancer
type: jail
disksize: 10g
- name: fileshare
type: jail
disksize: 15g
```
Apply configuration
```bash
$ nubectl apply
```
Divert configuration
```bash
$ nubectl divert
```
## WIP
This project is under heavy development. Anything can be changed rapidly for no reason.
## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.