Skip to content

Commit

Permalink
feat: introduce aws to minectl
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Panato <[email protected]>
  • Loading branch information
cpanato committed Sep 29, 2021
1 parent 614e8f7 commit 1da0160
Show file tree
Hide file tree
Showing 11 changed files with 579 additions and 50 deletions.
33 changes: 23 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* [Vultr](#vultr)
* [Azure](#azure)
* [Oracle Cloud Infrastructure](#oracle-cloud-infrastructure)
* [Amazon AWS](#amazon-aws)
- [Minecraft Server Versions 📚](#minecraft-server-versions-)
- [Minecraft Proxy Versions 📚](#minecraft-proxy-versions-)
- [Server Configs 📋](#server-configs-)
Expand Down Expand Up @@ -59,6 +60,7 @@
![Vultr](https://img.shields.io/badge/vultr-007BFC?style=for-the-badge&logo=vultr&logoColor=white)
![Microsoft Azure](https://img.shields.io/badge/Microsoft_Azure-0078D4?style=for-the-badge&logo=microsoft-azure&logoColor=white)
![Oracle Cloud Infrastructure](https://img.shields.io/badge/Oracle_Cloud_Infrastructure-F80000?style=for-the-badge&logo=oracle&logoColor=white)
![Amazon AWS](https://img.shields.io/badge/Amazon_AWS-FF9900?style=for-the-badge&logo=amazonaws&logoColor=white)

![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/dirien/minectl/Build%20Binary/main?logo=github&style=for-the-badge)
![GitHub](https://img.shields.io/github/license/dirien/minectl?style=for-the-badge)
Expand All @@ -81,6 +83,7 @@ It is a private side project of me, to learn more about Go, CLI and multi-cloud
+ Google Compute Engine (GCE) (https://cloud.google.com/compute)
+ Azure (https://azure.microsoft.com/en-us/)
+ Oracle Cloud Infrastructure (https://www.oracle.com/cloud/)
+ Amazon AWS (https://aws.amazon.com/)

### TL;DR 🚀

Expand Down Expand Up @@ -249,6 +252,14 @@ region=<region>

Please follow the instructions under -> https://docs.oracle.com/en-us/iaas/Content/API/Concepts/apisigningkey.htm

#### Amazon AWS

```bash
export AWS_ACCESS_KEY_ID=<aws_access_key_id>
export AWS_SECRET_ACCESS_KEY=<aws_secret_access_key>
export AWS_REGION=<aws_region>
```

#### Minecraft Server Versions 📚

> ⚠️ `minectl 🗺` is not(!) providing any pre-compiled binaries of Minecraft or download a pre-compiled version.
Expand Down Expand Up @@ -334,7 +345,7 @@ metadata:
name: minecraft-proxy
spec:
server:
cloud: <cloud provider name civo|scaleway|do|hetzner|linode|ovh|equinix|gce|vultr|azure|oci>
cloud: <cloud provider name civo|scaleway|do|hetzner|linode|ovh|equinix|gce|vultr|azure|oci|aws>
region: <cloud provider region>
size: <cloud provider plan>
ssh: "/Users/dirien/Tools/repos/stackit-minecraft/minecraft/ssh/minecraft"
Expand Down Expand Up @@ -370,7 +381,7 @@ spec:
monitoring:
enabled: true|false
server:
cloud: "provider: civo|scaleway|do|hetzner|linode|ovh|equinix|gce|vultr|azure|oci"
cloud: "provider: civo|scaleway|do|hetzner|linode|ovh|equinix|gce|vultr|azure|oci|aws"
region: "region see cloud provider for details eg. fra1"
size: "see cloud provider docs for details eg. g3.large"
volumeSize: 100
Expand Down Expand Up @@ -429,7 +440,7 @@ Flags:
Global Flags:
--headless Set this value to if mincetl is called by a CI system. Enables logging and disables human-readable output rendering (default: false)
--log-encoding string Set the log encoding: console|json (default: console) (default "console")
--verbose string Enable verbose logging: debug|info|warn|error|dpanic|panic|fatal
--verbose string Enable verbose logging: debug|info|warn|error|dpanic|panic|fatal
```
#### Delete Minecraft Server 🗑
Expand All @@ -446,7 +457,7 @@ Examples:
mincetl delete \
--filename server-do.yaml
--id xxx-xxx-xxx-xxx


Flags:
-f, --filename string that contains the configuration for minectl
Expand Down Expand Up @@ -478,11 +489,11 @@ Flags:
-h, --help help for list
-p, --provider string The cloud provider - civo|scaleway|do|hetzner|linode|ovh|equinix|gce|vultr|azure|oci
-r, --region string The region for your cloud provider

Global Flags:
--headless Set this value to if mincetl is called by a CI system. Enables logging and disables human-readable output rendering (default: false)
--log-encoding string Set the log encoding: console|json (default: console) (default "console")
--verbose string Enable verbose logging: debug|info|warn|error|dpanic|panic|fatal
--verbose string Enable verbose logging: debug|info|warn|error|dpanic|panic|fatal
```
#### Update Minecraft Server 🆙
Expand All @@ -509,7 +520,7 @@ Flags:
Global Flags:
--headless Set this value to if mincetl is called by a CI system. Enables logging and disables human-readable output rendering (default: false)
--log-encoding string Set the log encoding: console|json (default: console) (default "console")
--verbose string Enable verbose logging: debug|info|warn|error|dpanic|panic|fatal
--verbose string Enable verbose logging: debug|info|warn|error|dpanic|panic|fatal
```

#### RCON Minecraft Server 🔌
Expand Down Expand Up @@ -565,7 +576,7 @@ Flags:
Global Flags:
--headless Set this value to if mincetl is called by a CI system. Enables logging and disables human-readable output rendering (default: false)
--log-encoding string Set the log encoding: console|json (default: console) (default "console")
--verbose string Enable verbose logging: debug|info|warn|error|dpanic|panic|fatal
--verbose string Enable verbose logging: debug|info|warn|error|dpanic|panic|fatal
```

#### Monitoring 📊
Expand Down Expand Up @@ -673,7 +684,8 @@ Apache License, Version 2.0
- [x] New cloud provider - Vultr [#90](https://github.com/dirien/minectl/issues/90)
- [x] Add Suport for Proxy Server - bungeecord and waterfall [#95](https://github.com/dirien/minectl/issues/95)
- [x] New cloud provider - Azure [#56](https://github.com/dirien/minectl/issues/56)
- [x] New cloud provider - Oracle/OCI [#107](https://github.com/dirien/minectl/issues/107)
- [x] New cloud provider - Oracle/OCI [#107](https://github.com/dirien/minectl/issues/107)
- [x] New cloud provider - AWS [#210](https://github.com/dirien/minectl/pull/210)
- [ ] ...

### Libraries & Tools 🔥
Expand Down Expand Up @@ -704,6 +716,7 @@ Apache License, Version 2.0
- https://github.com/tcnksm/go-latest
- https://github.com/uber-go/zap
- https://github.com/oracle/oci-go-sdk
- https:/github.com/aws/aws-sdk-go

### Legal Disclaimer 👮

Expand All @@ -715,4 +728,4 @@ Other trademarks referenced herein are property of their respective owners.

Source:

##### [1] https://www.spigotmc.org/wiki/what-is-spigot-craftbukkit-bukkit-vanilla-forg/
##### [1] https://www.spigotmc.org/wiki/what-is-spigot-craftbukkit-bukkit-vanilla-forg/
2 changes: 1 addition & 1 deletion cmd/minectl/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

func init() {

listCmd.Flags().StringP("provider", "p", "", "The cloud provider - civo|scaleway|do|hetzner|linode|ovh|equinix|gce|vultr|azure|oci")
listCmd.Flags().StringP("provider", "p", "", "The cloud provider - civo|scaleway|do|hetzner|linode|ovh|equinix|gce|vultr|azure|oci|aws")
listCmd.Flags().StringP("region", "r", "", "The region (gce: zone) for your cloud provider - civo|gce")
}

Expand Down
6 changes: 4 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ require (
github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect
github.com/Masterminds/sprig/v3 v3.2.2
github.com/Tnze/go-mc v1.17.0
github.com/aws/aws-sdk-go v1.40.15
github.com/blang/semver/v4 v4.0.0
github.com/c-bata/go-prompt v0.2.6
github.com/civo/civogo v0.2.54
Expand All @@ -18,7 +19,8 @@ require (
github.com/fatih/color v1.13.0
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/google/go-github v17.0.0+incompatible // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/uuid v1.3.0
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-retryablehttp v0.7.0
github.com/hashicorp/go-version v1.3.0 // indirect
Expand Down Expand Up @@ -70,9 +72,9 @@ require (
github.com/form3tech-oss/jwt-go v3.2.2+incompatible // indirect
github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/googleapis/gax-go/v2 v2.1.0 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/kr/fs v0.1.0 // indirect
github.com/mattn/go-colorable v0.1.9 // indirect
github.com/mattn/go-tty v0.0.3 // indirect
Expand Down
7 changes: 7 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kd
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/aws/aws-sdk-go v1.40.15 h1:aqQCwW8meVzLCacWX8NEPg8bBkL0ZlcMSbhwrsg6eNE=
github.com/aws/aws-sdk-go v1.40.15/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q=
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
Expand Down Expand Up @@ -291,6 +293,10 @@ github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU=
github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8=
github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
Expand Down Expand Up @@ -575,6 +581,7 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v
golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985 h1:4CSI6oo7cOjJKajidEljs9h+uP0rRZBPPPhcCbj5mw8=
golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
Expand Down
Loading

0 comments on commit 1da0160

Please sign in to comment.