LoginSignup
3
2

More than 5 years have passed since last update.

さくらクラウドのMastodnを更新(1.3.2 -> 1.4.1)

Posted at

環境:さくらのクラウドです。

CentOS Linux release 7.3.1611 (Core)
ゼロからはじめるMastodon
なのでDockerコンテナではありません。

更新方法確認

環境整備

Release v1.4.1 に従って
■ Nodejsのversion確認

$ node -v
v6.10.3

先日カーネル更新したとき、一緒に更新してた。OK

■ pkgconfig 入ってた :D

# yum install pkgconfig
Package 1:pkgconfig-0.27.1-4.el7.x86_64 already installed and latest version

■ protobuf-devel protobuf-compiler 追加した。:)

# yum install protobuf-devel protobuf-compiler

■ /hove/mastodon/live/.env.production 確認
setしてたら調整してね!なので確認

.env.production
#CDN_HOST
#STREAMING_API_BASE_URL

何もセットしてない。

更新作業

■ fetch

# su - mastodon
$ cd live
$ git fetch
remote: Counting objects: 5466, done.
:(略)
 * [new tag]         v1.3.3     -> v1.3.3
From https://github.com/tootsuite/mastodon
 * [new tag]         v1.4.1     -> v1.4.1
 * [new tag]         v1.4rc1    -> v1.4rc1
 * [new tag]         v1.4rc2    -> v1.4rc2
 * [new tag]         v1.4rc3    -> v1.4rc3
 * [new tag]         v1.4rc4    -> v1.4rc4
 * [new tag]         v1.4rc5    -> v1.4rc5
 * [new tag]         v1.4rc6    -> v1.4rc6

■ checkout

$ git checkout v1.4.1

■ Release v1.4.1に従い依存関係更新

$ bundle install
Fetching gem metadata from https://rubygems.org/............
Fetching version metadata from https://rubygems.org/..
Fetching dependency metadata from https://rubygems.org/.
:(略)
Bundle complete! 81 Gemfile dependencies, 134 gems now installed.
Gems in the groups development and test were not installed.
Bundled gems are installed into ./vendor/bundle.

$ yarn install
yarn install v0.22.0
[1/4] Resolving packages...
[2/4] Fetching packages...
:(略)
Binary found at /home/mastodon/live/node_modules/node-sass/vendor/linux-x64-48/binding.node
Testing binary
Binary is fine
node-sass@4.5.2 /home/mastodon/live/node_modules/node-sass
Done in 151.98s.

■ Mastodon更新

$ RAILS_ENV=production bundle exec rails db:migrate
$ RAILS_ENV=production bundle exec rails assets:clobber
$ yarn install --pure-lockfile
$ RAILS_ENV=production bundle exec rails assets:precompile

■ サービス再起動

# systemctl restart mastodon-*.service

141.JPG :sunny: OK!

■ 少しトラブル X(

何故か、昨日分の画像が表示されなくなりました。
以前の物と、更新後の投稿分は正しく表示されます。

a.JPG

b.JPG

□ dairyを手で回してみるも変わらず ;(

$ ./.rbenv/shims/bundle exec rake mastodon:daily > /dev/null

ま、しょうがない
rails db:rollbackとか考えたけど、動いてるからいいや。

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2