• Stars
    star
    119
  • Rank 297,930 (Top 6 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created about 7 years ago
  • Updated almost 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

☁️ Go API for open cloud

GoCloud Logo

Codacy Badge Build Status Gitter docs

gocloud

GoCloud is a golang library which hides the difference between different APIs provided by varied cloud providers (AWS, GCP, OpenStack etc.) and allows you to manage different cloud resources through a unified and easy to use API.

Service Types

Compute -- Allows you to manage cloud and virtual servers.

Compute Storage -- Allows you to manage Compute storage.

Container -- Allows users to install and deploy containers onto container based virtualization platforms.

Load balancer -- Allows you to manager Load Balancer service.

DNS -- Allows you to manage DNS service.

Service Providers

AWS

Google

DigitalOcean

Ali-cloud

Vultr

Currently, implementations for other cloud providers are being worked on.

Install

Linux (Ubuntu)

  1. Install golang.

    $ sudo apt-get update -y
    $ sudo apt-get install golang -y
    
  2. Set GOPATH environment variable. Run gedit ~/.bashrc.
    Copy the following in your .bashrc file:

export GOPATH=$HOME/gopath
export GOBIN=$HOME/gopath/bin
  1. Test your installation by copying the following piece of code in a file. Save the file as gotest.go. Run the file using the command go run gotest.go. If that command returns “Hello World!”, then Go is successfully installed and functional.
package main
import "fmt"
func main() {
    fmt.Printf("Hello World!\n")
}
  1. Now we need to fetch the gocloud repository and other necessary packages. Run the following commands in order:
$ go get github.com/cloudlibz/gocloud
$ go get golang.org/x/oauth2
$ go get cloud.google.com/go/compute/metadata
  1. Create a directory called .gocloud in your HOME directory. Download your AWS, Google and DigitalOcean access credentials and store them in a file in your .gocloud folder.

    AWS:

    Save your AWS credentials in a file named amazoncloudconfig.json.

    {
      "AWSAccessKeyID": "xxxxxxxxxxxx",
      "AWSSecretKey": "xxxxxxxxxxxx"
    }

    Google Cloud Services:

    Save your Google Cloud credentials in a file named googlecloudconfig.json. The file is downloaded in the required format.

    DigitalOcean:

    Save your DigitalOcean credentials in a file named digioceancloudconfig.json.

    {
      "DigiOceanAccessToken": "xxxxxxxxxxxx"
    }

    Ali-cloud:

    Save your Ali-cloud credentials in a file named alicloudconfig.json.

    {
      "AliAccessKeyID":"xxxxxxxxxxxx",
      "AliAccessKeySecret":"xxxxxxxxxxxx"
    }

    Vultr:

    Save your Vultr credentials in a file named vultrconfig.json.

    {
      "VultrAPIKey":"xxxxxxxxxxxx"
    }
    

    You can also set your credentials as environment variables.

    AWS:

    export AWSAccessKeyID =  "xxxxxxxxxxxx"
    export AWSSecretKey = "xxxxxxxxxxxx"
    

    Google Cloud Services:

    export PrivateKey =  "xxxxxxxxxxxx"
    export Type =  "xxxxxxxxxxxx"
    export ProjectID = "xxxxxxxxxxxx"
    export PrivateKeyID = "xxxxxxxxxxxx"
    export ClientEmail = "xxxxxxxxxxxx"
    export ClientID = "xxxxxxxxxxxx"
    export AuthURI = "xxxxxxxxxxxx"
    export TokenURI = "xxxxxxxxxxxx"
    export AuthProviderX509CertURL = "xxxxxxxxxxxx"
    export ClientX509CertURL =  "xxxxxxxxxxxx"
    

    DigitalOcean:

    export DigiOceanAccessToken =  "xxxxxxxxxxxx"
    

    Ali-cloud:

    export AliAccessKeyID =  "xxxxxxxxxxxx"
    export AliAccessKeySecret =  "xxxxxxxxxxxx"
    

    Vultr:

    export VultrAPIKey =  "xxxxxxxxxxxx"
    
  2. You are all set to use gocloud! Check out the following YouTube videos for more information and usage examples: https://youtu.be/4LxsAeoonlY?list=PLOdfztY25UNnxK_0KRRHSngJIyVLDKZxq&t=3

Development setup

$ git clone https://github.com/cloudlibz/gocloud
$ cd gocloud

Unit tests

$ cd gocloud
$ go test -v ./...

Please make sure to delete all your instances, storage blocks, load balancers, containers, and DNS settings once you run the tests by visiting the respective web portals of the cloud providers.

More Repositories

1

nodecloud

⚡ The Node.js API for open cloud
JavaScript
93
star
2

clocal-azure

🔬 Emulation engine for Azure
JavaScript
76
star
3

clocal-gcp

🔭 Emulation engine for GCP
JavaScript
67
star
4

dunner

Dunner is a task runner tool like Grunt but used Docker images like CircleCI do. You can define tasks and steps of the tasks in your `.dunner.yaml` file and then run these steps with `Dunner do taskname`
Go
66
star
5

nodecloud-legacy

[DEPERECATED] REFER: nodecloud | The Node.js API for open cloud
JavaScript
54
star
6

nodecloud-azure-plugin

🔧 NodeCloud Azure plugin
JavaScript
52
star
7

nodecloud-aws-plugin

🔧 NodeCloud AWS plugin
JavaScript
47
star
8

react-email

React based components & utils curated for Emails.
TypeScript
46
star
9

nodecloud-gcp-plugin

🔧 NodeCloud GCP plugin
JavaScript
44
star
10

nodecloud-cli

📝 Command line interface for open cloud
JavaScript
29
star
11

CrawlerX

CrawlerX - Develop Extensible, Distributed, Scalable Crawler System which is a web platform that can be used to crawl URLs in different kind of protocols in a distributed way.
SCSS
21
star
12

nodecloud-examples

NodeCloud examples
18
star
13

installer.to

Simply `curl https://installer.to/name | bash` to install any tool
Shell
15
star
14

dunner-gocd-plugin

GoCD task plugin for Dunner, the docker task runner. https://github.com/leopardslab/dunner https://gocd.org
Java
7
star
15

ukiyo

🎠 A push based container update tool
Go
5
star
16

kubebot

Go
4
star
17

dunner-website

JavaScript
3
star
18

Gitter-ChatBot

Gitter-ChatBot
Python
3
star
19

nodecloud-ali-plugin

🔧 NodeCloud Ali Cloud plugin
JavaScript
3
star
20

expressPython

🚄🐍 expressPython - A small Python editor for learning and competitive programming.
C++
2
star
21

3Mon

JavaScript
2
star
22

nodecloud-digitalocean-plugin

🔧 NodeCloud DigitalOcean plugin
JavaScript
1
star
23

ChainX

ChainX
JavaScript
1
star
24

vim-nodecloud

🍀vim syntax highlighting for .nc.config
Vim Script
1
star
25

go-dep-docker

[Unofficial] Golang Docker image with Dep package manager tool
Dockerfile
1
star
26

leopardslab.github.io

Leopardslab website
JavaScript
1
star
27

genie

1
star
28

nodecloud-rfcs

📡 RFCs for NodeCloud
1
star
29

dunner-cookbook

1
star