• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

ericflo/kube-mastodon: This repository contains everything you need to get a Mas ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

ericflo/kube-mastodon

开源软件地址(OpenSource Url):

https://github.com/ericflo/kube-mastodon

开源编程语言(OpenSource Language):


开源软件介绍(OpenSource Introduction):

kube-mastodon

This repository contains everything you need to get a Mastodon server running on Mastodon 2.5.0.

Upgrading from 2.4.2

Upgrade the checkout of this repo:

git pull origin master

Replace the new deployments:

kubectl replace -f deploy/web-deployment.yml
kubectl replace -f deploy/streaming-deployment.yml
kubectl replace -f deploy/sidekiq-deployment.yml

Wait a minute or so for these to redeploy...

Now run a database upgrade by connecting to the new pod:

export MASTODON_POD=$(kubectl get pods -l app=mastodon-web -o jsonpath='{.items[0].metadata.name}')
kubectl exec $MASTODON_POD  -i -t -- bash -il

And once you're connected:

$ RAILS_ENV=production bundle exec rails db:migrate

You're all set - things should be upgraded now!

Deployment

Copy the template files to their proper places:

cp deploy/ingress.yml.template deploy/ingress.yml
cp deploy/secret.yml.template deploy/secret.yml

Now fill in the proper values for those files.

Then deploy everything else:

kubectl create -f deploy/config.yml
kubectl create -f deploy/secret.yml

kubectl create -f deploy/postgres-volume-claim.yml
kubectl create -f deploy/postgres-deployment.yml
kubectl create -f deploy/postgres-service.yml

kubectl create -f deploy/redis-volume-claim.yml
kubectl create -f deploy/redis-deployment.yml
kubectl create -f deploy/redis-service.yml

kubectl create -f deploy/web-deployment.yml
kubectl create -f deploy/web-service.yml

kubectl create -f deploy/streaming-deployment.yml
kubectl create -f deploy/streaming-service.yml

kubectl create -f deploy/sidekiq-deployment.yml

kubectl create -f deploy/ingress.yml
kubectl create -f deploy/external-dns.yml

Now look up the pod name for the web container:

kubectl get pods

Finally, connect to the web pod so we can set up the database (use the pod name from before):

export MASTODON_POD=$(kubectl get pods -l app=mastodon-web -o jsonpath='{.items[0].metadata.name}')
kubectl exec $MASTODON_POD  -i -t -- bash -il

Once you're connected, run this command to set up the db, but don't disconnect.

$ RAILS_ENV=production bundle exec rails db:migrate

Now in the same session, generate VAPID keys:

$ RAILS_ENV=production bundle exec rake mastodon:webpush:generate_vapid_key

Finally update your secret with the VAPID keys, and replace the secret:

kubectl replace -f deploy/secret.yml

You may need to kill your streaming, sidekiq, and web pods to get the new env vars.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap