20190628 Chatbots Meetup 10

Evan Lin 邀請,6/28 參與演講了 Chatbots Meetup 10 的第二場,分享如何在 Google Cloud Run 上部署 LINE Bot 的經驗談。(好像拖稿很久了)

因為時間的關係,到天瓏書局時已經開場講到一半啦。就錯過了 Evan LinWrite Image Proxy Server for LINE Bot in Go。就座的時候,LINE API ExpertCaesar Chi 正在介紹 LINE@ 2.0 offline to online ,分享如何透過 LIFF + Push 機制,讓廠商能更有效率的省錢轉換,並且也跟會眾們分享在官方帳號 2.0 轉換後的衍生想法。

接著就是我上台分享 LINE Bot on Cloud Run: 使用 line/line-bot-sdk-go ,本來是想介紹 LINE Bot on GKE ,不過準備的時候發現會需要花點時間講 K8S ,就不好講 LINE Bot 開發了,所以選了一個我也沒用過的 Cloud Run 來試看看。詳情就直接看投影片吧,然後順便把 source code 整理一下放上來

最後閃電講,直接貼共筆的圖好了 :Q 我覺得 Evan Lin講解比較詳細,哈哈,偷懶一下。

Fix: Unit “containerd.service” has failed

When I upgraded yum packages, docker service had stopped. So I check the system status try to figure out the root cause….

After google ‘Subject: Unit “containerd.service” has failed’, we can find a related github issue. It seems to be a containerd problem than a docker problem, and here’s the fix: (the following shows the before and after)

[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)

&

[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… Read more →

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

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:

Read more →

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:  Read more →

重整 Exif 資料

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

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 docker.

Updated 20150111: it seems the repo is out of managed now. And official repo is upgraded to 1.3.2. Thus the official repo is recommended now.

% # just use original one
% # curl -O https://copr.fedoraproject.org/coprs/goldmann/docker-io/repo/epel-7/goldmann-docker-io-epel-7.repo
% # sudo mv goldmann-docker-io-epel-7.repo
% # yum update
% # yum install docker-io
% sudo service docker start
Redirecting to /bin/systemctl start docker.service

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-