[GCP] Create disk from snapshot of another project

Step 0: create snapshot from desired disk, example name: disk-snapshot-20171026 Step 1: copy the selfLink from snapshot’s equivalent REST response: projects/another-project/global/snapshots/disk-snapshot-20171026 Note: One can get the link via the following command:

Step 2: execute the following command (replace current-project and asia-east1-a with your own project and zone, respectively)

 

Date
Categories
Tags
Comments

Published:October 26, 2017 View Post

devops

Leave a comment

[docker] Multi-stage builds

Consider the following scenario: you are going to rolling update your cluster, and it turns out your network bandwidth is limited for some reason and size of built docker image is not small enough. What’s worse, every instance of cluster will need to pull the docker image before start-up…

Date
Categories
Tags
Comments

CoreOS remove early-docker since 1284.0.0

It happens the docker daemon wasn’t alive when I login to the console.

After review the release document, it seems early-docker.target should be remove in all related target. Ref: CoreOS Release 1284.0.0

Date
Categories
Tags
Comments

Published:April 18, 2017 View Post

docker

Leave a comment

Update salt from 2015.5.3 to 2016.3.2

When reading salt’s source code, it seems we have a ‘source_hash_update’ option on “archive.extracted”, however when I added so, salt complains:

Date
Categories
Tags
Comments

Published:August 25, 2016 View Post

python

Leave a comment

Developing with consul on Macbook

For development use, we need to have consul running on localhost. When using a Macbook (Air), we need to specify the “-bind=0.0.0.0” and “-client=0.0.0.0” in order to have programs (tests) access to the consul agent in the container: 

Date
Categories
Tags
Comments

Published:August 15, 2016 View Post

docker golang mac

Leave a comment

重整 Exif 資料

多想幾天,可以不用重新發明輪子。 :p

Date
Categories
Tags
Comments

Published:August 3, 2016 View Post

life mac perl photo

Leave a comment

Install docker on Centos 7

Perform a yum search docker, we can see two docker available: docker.x86_64 : Automates deployment of containerized applications docker-io.x86_64 : Automates deployment of containerized applications Well, at least for today, the docker.x86_64, which is mentioned in , is still 0.11. So please install the docker-io.x86_64, which is 1.0.0-1.el7. Updated 20140829: there’s more up-to-date repo for…

Date
Categories
Tags
Comments

Published:August 14, 2014 View Post

golang

Leave a comment

EPEL 7 for Centos 7

To install EPEL-7

Also, enable it by default, edit /etc/yum.repos.d/remi.repo and set ‘enable=1’ under section of [remi] and [remi-php56].

Date
Categories
Tags
Comments

Published:August 14, 2014 View Post

Uncategorized

Leave a comment

Install GNU gcc 4.8.2 on CentOS 6.4

Install pre-requirements:

Download and extract gcc 4.8.2 source tar ball:

Build and install:

Date
Categories
Tags
Comments

Published:November 5, 2013 View Post

Uncategorized

Leave a comment

Crop image in golang

In python, for cropping  image I use PIL. However the dependencies of PIL is huge, also need to install some lib*-dev packages. So I choose go to crop images: Usage: % go run crop.go large.jpeg thumbnail.jpg

Date
Categories
Tags
Comments

Published:October 4, 2013 View Post

golang

Leave a comment