GithubHelp home page GithubHelp logo

sibosendteam / shippy Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 1.0 1.46 MB

用GoLang实现微服务教程代码,参考https://ewanvalentine.io, Microservices in Golang

License: MIT License

Dockerfile 2.22% Makefile 6.86% Go 55.85% HTML 5.24% CSS 0.55% JavaScript 29.28%
docker-kubernetes golang

shippy's Introduction

Shippy

Golang 微服务系列教程代码实现

参照Ewan Valentine的系列博客,针对kubernetes和docker部署,整理了其源码(Google Cloud和CircleCI因不在研究范围,未使用)

Table of Contents

Install Docker

Mac: Install Docker Desktop for Mac

Windows: Install Docker Desktop for Windows

Install Kubernetes

Install kubectl

kubectl,是Kubernetes的命令行工具。

Kubernetes官网提供了各种环境kubectl的安装方法: https://kubernetes.io/docs/tasks/tools/install-kubectl/

Kubernetes

在Docker Desktop for Mac 17.12 Edge(Docker Desktop for Windows 18.02 Edge (win50) or 18.06 Stable (win70))及更高版本中,包含一个运行在Mac上的独立Kubernetes服务器,可以在Kubernetes上测试部署Docker工作负载。因此我使用了docker中自带的kubernetes, 如下图:

docker enable kubernentes

但是,Kubernetes需要的镜像从官方下载需要翻墙,可以先设置阿里云镜像加速地址,或者手动拉取Kubernetes需要的镜像后,再打开docker的kubernetes功能。

镜像加速:

镜像加速

手动拉取镜像: https://www.jianshu.com/p/e5c056baa8ab

Kubernetes Dashboard(可选)

Kubernetes Dashboard是Kubernetes的Web用户界面,允许用户管理集群中运行的应用程序并对其进行故障排除,以及管理集群本身。

$ kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v1.10.1/src/deploy/recommended/kubernetes-dashboard.yaml

$ kubectl proxy

Dashboard access:

http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/.

以下为我的docker+kubernetes版本:

docker+kubernetes

当然,使用Minikube也可以。

Deploy Services

shippy's People

Contributors

yun-tao avatar

Watchers

 avatar  avatar

Forkers

7253641

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.