起きるよー
@t_trace i have a daily cron job to confirm the tunnel is alive. It is usually around 165 ms but sometimes slower like this morning.
docker試してみたいのでまずは古いデスクトップ掘り出してきてubuntu-server入れて(なんかまちがってる
sudo dd if=ubuntu-17.04-server-amd64.iso of=/dev/sdb
of合ってますように(-人-)
ubuntu-server 17.04さん、guided partiioningしたら80GBぜーんぶrootにするんだね
OpenSSH serverだけじゃなくてvirtual machine hostも選んで… (これってdockerのことかなあ)
よーっし。Wake on Lanで起動してきた♪
$ heroku pg:info DATABASE
=== DATABASE_URL, PG_HOBBY_BASIC_URL
Plan: Hobby-basic
Status: Available
Connections: 8/20
PG Version: 9.6.1
Created: 2017-04-20 18:31 UTC
Data Size: 63.4 MB
Tables: 29
Rows: 72970/10000000 (In compliance)
Growth of database rows on this single-account instance. Interesting to see lower growth late after the initial growth.
I'll update cost estimates in a week or so (in Japanese: https://github.com/zunda/mastodon/wiki/CostConsiderationsOnHeroku )
New release '16.04.2 LTS' available.
Run 'do-release-upgrade' to upgrade to it.
お?
$ git fetch upstream
$ git rev-parse upstream/master
e1b42e9aa01b0c6adab05afb9c5ee0cf9fbb41a9
$ git rev-parse v1.4rc3
b51398d0ddf4c4b366e104c67366f6a80b69d61b
$ git checkout master
$ git rebase upstream/master
$ git push
$ git checkout zunda-ninja-master-on-heroku
$ git merge v1.4rc3
$ git push
Oops... there is something unexpected on release command.
Finally, release phase went through and this instance is at 1.3rc3 https://mastodon.zunda.ninja/media/ktyuWgPkdVIeL5v3ytg
アプリのビルドってプロダクションのホストでやるのが普通なん… (はよdockerはじめて確かめい)
$ sudo apt install docker.io
これでいいのかな? (17.04)
https://store.docker.com/editions/community/docker-ce-server-ubuntu
To install Docker CE, you need the 64-bit version of one of these Ubuntu versions:
Yakkety 16.10
Xenial 16.04
Trusty 14.04
17.04はw
@t_trace t2インスタンスはCPUを使いすぎるとしばらく遅くなっちゃうので要注意ですね https://aws.amazon.com/jp/ec2/instance-types/t2/
mp4の解析になにか足りないと。
Command :: file -b --mime '/tmp/8d777f385d3dfec8815d20f7496026dc20170523-16-2afx37.mp4'
[AV] Running command: if command -v avprobe 2>/dev/null; then echo "true"; else echo "false"; fi
[AV] Running command: if command -v ffmpeg 2>/dev/null; then echo "true"; else echo "false"; fi
16 TID-or562cy3c WARN: Av::UnableToDetect: Unable to detect any supported library
mp4ファイルをラップトップのDownloadsにダウンロードしたので余裕があればあとでみてみること
@yukotan 運動する時間なかなか取れませんよね。僕は買い物のとき少し遠くに停めて歩くだけで満足したりしてます。ダメダメw
$ heroku run bash
~ $ ffmpeg
bash: ffmpeg: command not found
~ $ avprobe
bash: avprobe: command not found
そゆことw
動画を投稿しようとしたら500ですってよ、奥さん
method=POST path=/api/v1/media format=html controller=Api::V1::MediaController action=create status=500 error='Av::UnableToDetect: Unable to detect any supported library' duration=153.48 view=0.00 db=12.28
ffmpegパッケージ入れてみた
method=POST path=/api/v1/media format=html controller=Api::V1::MediaController action=create status=500 error='Cocaine::CommandNotFoundError: Cocaine::CommandNotFoundError' duration=94.89 view=0.00 db=12.84
~ $ ffmpeg
ffmpeg: error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory
先はながい
LD_LIBRARYPATHに少なくとも/app/.apt/lib/x86_64-linux-gnuと/app/.apt/usr/lib/x86_64-linux-gnu/mesaを追加して、libxdamage1パッケージも入れる必要がある。
@ms2sato Federatedで動画メディアがやってきても同様のエラーが出るような気がします〜
@zundan@admins.mstdn.social 通知音が聞こえなくなったかと思ったけど音量下げてるだけでした
Herokuで動画対応できたかな?ちょっとこのインタンスで使ってみよう。
ffmpegなしで259 MBだったslugは動画対応で311 MBまで太りました。
@hamster00 Tuskyからアップロードできるようになりました https://github.com/zunda/mastodon/compare/master...add-ffmpeg-on-heroku
@hamster00 Tuskyではファイルの大きさが4 MBまでという制限がありました。Mastodon本体の制限はまだ確認してません。
$ heroku pg:info DATABASE
=== DATABASE_URL, PG_HOBBY_BASIC_URL
Plan: Hobby-basic
Status: Available
Connections: 9/20
PG Version: 9.6.1
Created: 2017-04-20 18:31 UTC
Data Size: 64.7 MB
Tables: 29
Rows: 75394/10000000 (In compliance)
avprobeコマンドを使うようにするにはlibav-toolsパッケージを足してslugは311.3MB。 https://github.com/zunda/mastodon/tree/add-avprobe-on-heroku
@tadd heroku-buildpack-aptでslug内に無理やり格納してます
https://github.com/tootsuite/mastodon/blob/1fd18a61bdbdc7b767f42b2f186f9c2c62ea37c4/app.json#L98
https://github.com/zunda/mastodon/blob/add-avprobe-on-heroku/Aptfile#L3
https://github.com/zunda/mastodon/blob/add-ffmpeg-on-heroku/Aptfile#L3-L5
@tadd あ、無理やりなのでLD_LIBRARY_PATHに追加が必要です
https://github.com/zunda/mastodon/blob/add-avprobe-on-heroku/.profile.d/mastodon-avprobe-library-paths.sh
https://github.com/zunda/mastodon/blob/add-ffmpeg-on-heroku/.profile.d/mastodon-ffmpeg-library-paths.sh
I could confirm the video posted on this instance has reached mastodon.social :)
Mastodonで動画を扱えるようにするのに、
- ffmpegを使う https://github.com/zunda/mastodon/tree/add-ffmpeg-on-heroku のと
- avprobeを使う https://github.com/zunda/mastodon/tree/add-avprobe-on-heroku
のとどちらが良いかな。どちらもslugは同じくらい太るのですが、メモリにはavprobeの方がやさしい感じ。avprobeの方が依存パッケージの数が少ないのも良さそうです。どうしようかな?
下記のメモリ使用量の変化はv72がffmpeg、v73がavprobeです https://mastodon.zunda.ninja/media/nePp5QeEW1VwEwM-36o
そうそう、PRマージしてもらってもGitHubでブランチ消さない方が良さそうですよね。リンク先がなくなっちゃう議論がある。
avprobeでPRしてみますたっ https://github.com/tootsuite/mastodon/pull/3274
Oops "Scripts in .profile.d/ should only be written by buildpacks. If you need to perform application specific initialization tasks at the time a dyno boots, you should use .profile scripts, which are guaranteed to run after the scripts in .profile.d/." https://devcenter.heroku.com/articles/buildpack-api#profile-d-scripts
- avprobe vulnerability 約 513 件 (0.32 秒)
- ffmpeg vulnerability 約 471,000 件 (0.40 秒)
さてG先生を信用してよいものかw
@usa あー。ですね。ありがとうございます。これだとどうだ
- ffmpeg: About 449 results (0.26 seconds)
- avprobe: なし
- libav: About 581 results (0.25 seconds)
ふーむー
@tadd 公式にはサポートしてないのでちょっと微妙なんですよねー。パッケージのつくりによってはインストールしたライブラリを見つけられないこともあるし。
Stack Overflow: Helping One Million Developers Exit Vim - Stack Overflow Blog https://stackoverflow.blog/2017/05/23/stack-overflow-helping-one-million-developers-exit-vim/
$ git checkout master
$ git fetch upstream
$ git rev-parse upstream/master
f5c3d20e9cbd2e57d48c6080691eb493be10c7fc
$ git rebase upstream/master
$ git push
$ git checkout zunda-ninja-master-on-heroku
$ git merge master
$ cat .profile.d/mastodon-nodejs-dataurl.sh >> .profile
$ git rm .profile.d/mastodon-nodejs-dataurl.sh
$ git add .profile
$ git commit
$ git push
Merged from tootsuite/mastodon master at f5c3d20e9cbd2e57d48c6080691eb493be10c7fc :)
む?
May 24 18:33:03 zundan-mastodon app/web.1: 16 TID-t75ww WARN: ActiveRecord::RecordNotFound: Couldn't find Status with 'id'=50879
Moved back to ffmpeg (v74) and the app uses less memory. Might there be other changes making this happen? https://mastodon.zunda.ninja/media/7LcOH3Iw6o4zrkeGFcE
Mastodon 1.4へのアップデートに苦労してるのってcld3関連かな?Ubuntu 16.04 (Herokuのheroku-16スタック)だと下記のパッケージを追加で入れる必要がありました
- protobuf-compiler
- libprotobuf-dev
Mastodon 1.4 (これは1.3以前もかな?) ついでに下記のパッケージも入れると動画も取り扱えるようになるよ
- ffmpeg
- libxdamage1
- libxfixes3
@h12o@blessedgeeks.org デスデス https://github.com/tootsuite/mastodon/pull/3301 (モウマージサレテタ
$ HEROKU_APP=zundan-mastodon heroku pg:info DATABASE
=== DATABASE_URL, PG_HOBBY_BASIC_URL
Plan: Hobby-basic
Status: Available
Connections: 8/20
PG Version: 9.6.1
Created: 2017-04-20 18:31 UTC
Data Size: 66.9 MB
Tables: 29
Rows: 80218/10000000 (In compliance)
\マスターに/ \追随しますたー/
b89ab7e69dd49c68c460488e1d255ba72e8dacab
I'm a little bit worried about bigger slug size of 360.7 MB. What made this increase?
Ran heroku repo:purge_cache and it is now 307.3 MB. Phew.
I think this is for a toot I had to delete... Sorry.
May 25 23:16:23 zundan-mastodon app/web.1: 17 TID-nmc58 WARN: ActiveRecord::RecordNotFound: Couldn't find Status with 'id'=51671
https://store.lantronix.com/product_p/xdt2321002-01-s.htm
やっぱりかっこ良さのためだけに買うにはちょっと高いw
:sadpanda:
Gem::RemoteFetcher::UnknownHostError: timed out
(https://rubygems.org/gems/climate_control-0.2.0.gem)
An error occurred while installing climate_control (0.2.0), and Bundler cannot
continue.
Make sure that `gem install climate_control -v '0.2.0'` succeeds before
bundling.
!
! Failed to install gems via Bundler.
!
:sadpanda:
rake aborted!
KeyError: key not found: "S3_REGION"
Well, actually, I wanted to try CI on my machine and gave up preparing the environment. It is such a hard thing to do correctly :P
$ curl -o - https://get.docker.com > get.docker.com.sh
$ sudo sh get.docker.com.sh
$ sudo usermod -aG docker zunda
ふーむー
78445dd45222: Pull complete
Digest: sha256:c5515758d4c5e1e838e9cd307f6c6a0d620b5e07e6f927b07d05f6d12a1ac8d7
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
:
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
おー
/var/lib/dockerを別のディスクのディレクトリへのシンボリックリンクにしてみました
Error: Cannot find module './spec/javascript/setup.js'
うむさきはながいな
Config vars needed to get PaperClip going on Heroku CI: https://mastodon.zunda.ninja/media/RD7OBxXKcmAay4JNb50
Merged v1.4rc4
2d97c898f281fca9838ed8422e60370428f60ad7
Preping to build Mastodon on Docker. It seems that I have to make a mess on local clone to be able to run `rake secret` before I can run docker-compose build.
$ sudo apt install libpq-dev protobuf-compiler libprotobuf-dev pkg-config nodejs
$ rbenv install 2.4.1
$ rbenv local 2.4.1
$ gem install bundler
$ bundle install --path=vendor/bundle
"The command doesn't need to be run with sudo as it needs no superpowers." hm - Raspberry Pi • View topic - sync vs "sudo sync" https://www.raspberrypi.org/forums/viewtopic.php?t=56171&p=425979
$ sync; sync; sync; sudo reboot
(-人-)<どうしてsyncにはsudoいらんのやろ
一般ユーザーでもsync(2)成功してますね :)
$ strace sync
:
sync() = 0
:
+++ exited with 0 +++
てか失敗しないって書いてあるしw
$ docker -v
Docker version 17.05.0-ce, build 89658be
勝ったw (きょういれました。まだつかいかたわかりません)
Merged v1.4rc5
e0e12b0feefd84437f33a3af1290fce65d5b22a0
\RCに/ \追随したらしー/ (くるちい)
どっかでDocker内のインスタンス上げるの大変そうなのを読むと、Herokuよくできてんな、って思う。なんだかもうしわけない。
このインスタンスのソースコードの位置を修正して、AGPLについて明記した
$ heroku pg:info DATABASE_URL
=== DATABASE_URL, PG_HOBBY_BASIC_URL
Plan: Hobby-basic
Status: Available
Connections: 8/20
PG Version: 9.6.1
Created: 2017-04-20 18:31 UTC
Data Size: 68.9 MB
Tables: 29
Rows: 82524/10000000 (In compliance)
@t_trace トレッドミルで「歩き」ながら仕事してる同僚もいます。ちょっとエクストリームw
無料期間過ぎたAWSさんとならHerokuさん値段で張りあえるかもと思っていた時期もありましたw
Getting drunk and wanting to write code. (I know it doesn't work as I want it to.)