ひょんなことからgolang書いてます。
もともとpythonでスクリプト書いていたんですが、モジュールをいちいち入れなければいけないってのがネックでどうしたものかなあと考えていたところ、goで書いてバイナリを置いておけば、お手軽で良いじゃんってことで書き始めた。
せっかく新しい言語なので、今までのvimじゃなくて、なんとなくVisual Studio Codeで書いている。今のところ良さそう。
ひょんなことからgolang書いてます。
もともとpythonでスクリプト書いていたんですが、モジュールをいちいち入れなければいけないってのがネックでどうしたものかなあと考えていたところ、goで書いてバイナリを置いておけば、お手軽で良いじゃんってことで書き始めた。
せっかく新しい言語なので、今までのvimじゃなくて、なんとなくVisual Studio Codeで書いている。今のところ良さそう。
The Gearman protocol operates over TCP, port 4730 by default. It previously operated on port 7003, but this conflicted with the AFS port range and the new port (4730) was assigned by IANA
とのこと。 最近gearmanを新しくインストールする機会があり、aptで入れたらポート4730で立ち上がってて、gearmanのポートって7003じゃなかったっけ? ってはてと思ったのでした。
ちょっと複雑で口頭で相談したいことがらってありますよね。
でも、その前に、何について相談したいので概要レベルで事前に教えて欲しいよねって思うこと多い。 事前にまとめておいてくれると、口頭で話すときにすぐ適切な答えを出せるし、お互いの時間を有効活用出来て良いと思うんですよね。って最近よく思ってます。
最近のUbuntuさんでhostname変えるには、
— masasuzu 🍶🐫 (@masasuz) 2018年2月12日
/etc/hostnameを直修正じゃなくて、
`hostnamectl set-hostname ${new_hostname}`
的な感じで良いのかしら?
hostnamectl set-hostname ${new_hostname}
これで良いらしい。
/etc/hostname
を直修正した後に再起動したら、hostnameが戻っていたので、あれーって思って困ってたのでした。
Ubuntu16.04でgrep実行したらこんなwarningが出た
grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
どうやら、将来的に$GREP_OPTIONSは廃止されるらしい。
This variable specifies default options to be placed in front of any explicit options. As this causes problems when writing portable scripts, this feature will be removed in a future release of grep, and grep warns if it is used. Please use an alias or script instead.
ちなみにgrepのバージョンは以下の通り。
% grep --version grep (GNU grep) 2.25 Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Mike Haertel and others, see <http://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>. grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
最近のgrepで$ GREP_OPTIONS 設定してるとwarning出すようになったの?
— masasuzu 🍶🐫 (@masasuz) December 6, 2017
ふーん。将来的には廃止になるみたいだね
— masasuzu 🍶🐫 (@masasuz) December 6, 2017
んーと、
— masasuzu 🍶🐫 (@masasuz) November 22, 2017
docker上のubuntu16.04でPOSIX::strftime::Compilerビルドしようと思ったら、04_tzset.tが失敗してた。
テストの中でtimezoneセットしてるのにGMTから変わってなくてなんだこれ。。。。?って思ってたら、tzdataがインストールされてなかったというオチ。
、、、、、、時間返せ。
その通りで、こんなDockerfileでビルドしたら
FROM ubuntu:16.04 WORKDIR /opt/ex RUN apt-get update RUN apt-get install curl perl make -y RUN curl -L https://cpanmin.us | perl - App::cpanminus RUN cpanm --verbose POSIX::strftime::Compiler
こんな感じで失敗したというお話。
# Failed test at t/04_tzset.t line 35. # got: '+0000' # expected: '+0930' # Failed test 'Australia/Darwin / 2013-1-10 => Australia' # at t/04_tzset.t line 37. # 'Australia' # doesn't match '(?^:A?CST)' # Failed test at t/04_tzset.t line 45. # got: '+0000' # expected: '+0930' # Failed test 'Australia/Darwin / 2013-1-10 => GMT' # at t/04_tzset.t line 47. # 'GMT' # doesn't match '(?^:A?CST)' # Failed test at t/04_tzset.t line 35. # got: '+0000' # expected: '+0930' # Failed test 'Australia/Darwin / 2013-5-10 => Australia' # at t/04_tzset.t line 37. # 'Australia' # doesn't match '(?^:A?CST)' # Failed test at t/04_tzset.t line 45. # got: '+0000' # expected: '+0930' # Failed test 'Australia/Darwin / 2013-5-10 => GMT' # at t/04_tzset.t line 47. # 'GMT' # doesn't match '(?^:A?CST)' # Failed test at t/04_tzset.t line 35. # got: '+0000' # expected: '+0930' # Failed test 'Australia/Darwin / 2013-8-15 => Australia' # at t/04_tzset.t line 37. # 'Australia' # doesn't match '(?^:A?CST)' # Failed test at t/04_tzset.t line 45. # got: '+0000' # expected: '+0930' # Failed test 'Australia/Darwin / 2013-8-15 => GMT' # at t/04_tzset.t line 47. # 'GMT' # doesn't match '(?^:A?CST)' # Failed test at t/04_tzset.t line 35. # got: '+0000' # expected: '+0930' # Failed test 'Australia/Darwin / 2013-11-15 => Australia' # at t/04_tzset.t line 37. # 'Australia' # doesn't match '(?^:A?CST)' # Failed test at t/04_tzset.t line 45. # got: '+0000' # expected: '+0930' # Failed test 'Australia/Darwin / 2013-11-15 => GMT' # at t/04_tzset.t line 47. # 'GMT' # doesn't match '(?^:A?CST)' # Looks like you failed 16 tests of 16. # 以下略
最初見たときtimezone設定してるのにGMT????何やっても+0000なの?????? は???って感じだった。
どうやらtzdataが入ってなかったようで、どっかのタイミングでapt-get install tzdata
をしてあげれば良さそう。
イメージがコンパクト過ぎると逆に思いもやらないところでやられてしまうという好例でした。
逆に言うと普段の環境が盛々すぎるとも言えるのかな。
アプリをDocker化してそれをもってブルーグリーンデプロイできれば良いなあって妄想している。
ただ、設定ファイルのちょっとした変更だけで全部入れ替えになるのはどうなんだろう。ファイル配って再起動で終わりにしたい気分のときもあるだろう。 そういうときどうするんだろうね。。。。?
って発想が出てくるのはビルドをしない言語を使ってるからかもしれない。ビルドを基本とする言語を使っていれば、ちょっとした変更でもビルドが必要となるから、Dockerのリビルドは気にならないのかも知れない。 そういうことですかね。。。?どうなんでしょ?
試行と思考を残しておきたい。
けど、どうしたものか。
てのはありつつも、開発環境の構築フローが楽になるというメリットはすごいので、なんとか諸問題クリアしたい。 というかこれではざっくりしすぎなので、もう少し深掘りしたい。
現在の問題についても深掘りしたい。