IBM Cloud hack
This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
Find a file
Vincent Batts 4e76f510b3
initial commit from IBM Cloud example
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2019-06-03 10:42:48 +02:00
.bluemix initial commit from IBM Cloud example 2019-06-03 10:42:48 +02:00
chart/myappziugv initial commit from IBM Cloud example 2019-06-03 10:42:48 +02:00
plugins initial commit from IBM Cloud example 2019-06-03 10:42:48 +02:00
routers initial commit from IBM Cloud example 2019-06-03 10:42:48 +02:00
.cfignore initial commit from IBM Cloud example 2019-06-03 10:42:48 +02:00
.dockerignore initial commit from IBM Cloud example 2019-06-03 10:42:48 +02:00
.gitignore initial commit from IBM Cloud example 2019-06-03 10:42:48 +02:00
.ibm-project initial commit from IBM Cloud example 2019-06-03 10:42:48 +02:00
cli-config.yml initial commit from IBM Cloud example 2019-06-03 10:42:48 +02:00
Dockerfile initial commit from IBM Cloud example 2019-06-03 10:42:48 +02:00
Dockerfile-tools initial commit from IBM Cloud example 2019-06-03 10:42:48 +02:00
go.mod initial commit from IBM Cloud example 2019-06-03 10:42:48 +02:00
go.sum initial commit from IBM Cloud example 2019-06-03 10:42:48 +02:00
Gopkg.lock initial commit from IBM Cloud example 2019-06-03 10:42:48 +02:00
Gopkg.toml initial commit from IBM Cloud example 2019-06-03 10:42:48 +02:00
Jenkinsfile initial commit from IBM Cloud example 2019-06-03 10:42:48 +02:00
LICENSE initial commit from IBM Cloud example 2019-06-03 10:42:48 +02:00
manifest.yml initial commit from IBM Cloud example 2019-06-03 10:42:48 +02:00
README.md initial commit from IBM Cloud example 2019-06-03 10:42:48 +02:00
run-dev initial commit from IBM Cloud example 2019-06-03 10:42:48 +02:00
server.go initial commit from IBM Cloud example 2019-06-03 10:42:48 +02:00

MyAppZIUGV

Platform

Table of Contents

Summary

This application generated stubs for each route defined in the provided OpenAPI 2.0 document. It follows the microservice architecture - an architectural style that structures an application as a collection of loosely coupled services, which implement business capabilities. This application exposes a RESTful API matching a OpenAPI 2.0 definition that you provided.

All of your dep dependencies are stored inside of Gopkg.toml.

Requirements

Local Development Setup (optional)

IBM Cloud Developer Tools (optional)

IBM Cloud Developer Tools simplifies the building, running, and deployment of your application from you local environment to the cloud in containerized environments.

  1. Install IBM Cloud Developer Tools on your machine
  2. Install the dev plugin: ibmcloud plugin install dev

cli-config.yml

The cli-config.yml contains the commands that are used by IBM Cloud Developer Tools. If needed, you can update these to reflect how you want to run your project:

  • test-cmd: The command to execute tests for the code in the tools container (i.e. go test ./...)

  • build-cmd-debug: The command to build the code and docker image for DEBUG mode (i.e. go build to ensure that the application compiles cleanly)

  • debug-cmd: The command to execute debug of the code in the tools container using delve (i.e. dlv debug --headless --listen=0.0.0.0:8181)

IBM Cloud DevOps (optional)

Create Toolchain

IBM Cloud DevOps services provides toolchains as a set of tool integrations that support development, deployment, and operations tasks inside IBM Cloud. The Create Toolchain button creates a DevOps toolchain and acts as a single-click deploy to IBM Cloud including provisioning all required services.

Run

Configuration

This project contains IBM Cloud specific files that are used to deploy the application as part of an IBM Cloud DevOps flow. The .bluemix directory contains files used to define the IBM Cloud toolchain and pipeline for your application.

Credentials are either taken from the VCAP_SERVICES or Kubernetes environment variablea if in IBM Cloud, or from a config file if running locally or on VSIs.

More information about configuration best practices and abstraction of environments can be found in the IBM Cloud Go Programming Guide.

Using IBM Cloud Developer Tools

IBM Cloud Developer Tools makes it easy to compile and run your application if you do not have all of the tools installed on your computer yet. Your application will be compiled with Docker containers. To compile and run your app, run:

ibmcloud dev build
ibmcloud dev run

Using your local environment

In order for Go applications to run locally, they must be placed in the correct file path. The application must exist in $GOPATH/src/myappziugv

To run your application locally:

dep ensure
go run server.go

Once the Go toolchain has been installed, you can compile a Go project with:

go install

Your sources will be compiled to your $GOPATH/bin directory.

Application Endpoints

Your application is running at: http://localhost:8080 in your browser.

  • Health endpoint: /health