January 20, 2018

Make REST API Documentation using swagger in Go

For golang based HTTP/REST API documentation,I choose swagger. go-swagger has several features for swagger documentation. The go-swagger can generate swagger spec based code generation but I already have an REST API server. I use go-swagger with golang comment annotation for swagger spec generation. For REST API development, Design first with writing spec and then generating codes from it is a good approach. goa is a famous tool for this style. Read more

December 5, 2017

Releasing with bumpversion, govvv and drone

One of pleasures about coding is using good tools. Recently I use bumpversion, govvv and drone for version releasing. bumpversion bumpversion is automation for semantic versioning. Most of my projects have simple config file like below. (.bumpversion.cfg) [bumpversion] commit = True tag = True current_version = 0.8.4 parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+) serialize = {major}.{minor}.{patch} [bumpversion:file:VERSION] Before release,I just run like below: bumpversion minor # or major or patch This update minor version number in VERSION file. Read more

September 14, 2015

Using docker-machine

The Docker machine is a command tool created by the docker team to manage docker servers. It automatically creates hosts and installs docker engine on them and configures the docker client to talk. If you install the docker machine tool,you can use it like below: $docker-machine ls NAME ACTIVE DRIVER STATE URL SWARM host1 generic Running tcp://192.168.99.100:2376 host1 (master) host2 generic Running tcp://192.168.99.101:2376 host1 host3 generic Running tcp://192.168.99.102:2376 host1 demo0 virtualbox Stopped demo1 virtualbox Stopped demo2 virtualbox Stopped demo3 virtualbox Stopped infra virtualbox Stopped $docker-machine ssh host1 . Read more

February 14, 2015

About Docker Swarm

오랜만에 docker-korea meetup에서 About Docker Swarm이라는 이름으로 작은 발표를 했다. 장표는 매우 간단하게 구성하고 데모에서 많은 이야기를 하고 싶었는데. 프로젝터설정부터 힘들어서 준비했던것을 절반밖에 이야기하지 못한것 같다. Docker Swarm은 다른 클러스텅 시스템과 다른 부분들이 있다. 가장 큰 다른 점은 Docker에서 만들었다는 것. 즉 coreos/fleet이 Distributed Init System을 표방하는 것과 비슷하게 Swarm은 Docker-native Clustering System을 이야기한다. 1 즉 다음과 같은 확장으로 Docker Interface(CLI/API)을 유지하고 싶어 한다. docker run -d nginx-logger -e affinity:container==nginx nginx-logger Google의 k8s나 다른 클러스트링 도구는 각자 자신만의 개념과 그 개념의 이해를 사용자에게 수반하게 만드는데. Read more

December 20, 2014

Vengo 사용하기

Python을 사용하는 사람이라면, virtualenv을 잘 알것이다. 각 프로그램마다 각자의 파이썬 환경을 구성할수 있는 도구이다. (Py3에 기본으로 추가되어 있다) go tool은 개인적으로 불만이 많은 도구이다. 특히 go get은 여러가지 기능의 부족으로 당황스러움을 느끼게 한다. 가령 go get은 scm(git,hg…)에서 직접 가져온다. 하지만 언제나 master branch의 최신을 가져온다. 즉 버져닝(versioning)에 대한 부분이 없다. 그리고 go get은 상대경로에 대한 인식을 하지 않는다. 언제나 $GOPATH부터 절대 경로로 패캐지를 임포트해야 한다. (언어의 제안사항이 아님) go get에 특정 브랜치나 특정 태그(버젼)을 추가하자는 이야기는 go-nuts에 많이 (주기적으로) 나오는 이야기로 알고 있다. Read more

© 2019. All rights reserved.

Powered by Hugo & Kiss.