ProCourse インストーラー

このプラグインは、サーバーにログインすることなく新しいプラグインを非常に簡単にインストールできるように設計されています。/admin/plugins/procourse-installer に以下の画面が追加されます。

そこから、プラグインの Git リポジトリの URL(.git を含めても含まなくても構いません)を入力し、「Install Plugin」をクリックします。インストールが完了するまで数分(約 5 分)お待ちください。完了すればすぐに使用可能です。

インストーラーを通じてインストールしたすべてのプラグインを表示したり、プラグインを削除したりするには、「Installed Plugins」に移動するだけです。


いくつかの注意点:

  • これらのプラグインは、app または web_only の再構築やブートストラップを行っても残ります。

  • 現在はマルチサイトインスタンスではテストされておらず、プラグインが機能するためにアプリケーションの /plugins ディレクトリへのアクセスが必要なため、そのようなシナリオでは失敗する可能性が高いです。

  • インストールされたプラグインは /admin/plugins にも表示されます。

  • これらのプラグインは /admin/upgrade から通常通りアップグレードできます。

  • このプラグインの開発過程で、プラグインから翻訳を削除する際に潜在的なエラーが見つかりました。翻訳が使用されているページにユーザーがアクセスすると、サイトがエラーを表示する可能性があります。これは、admin/upgrade を使って特定のプラグインをアップグレードした場合でも、そのプラグインから翻訳が削除されていると発生するようです。現在、この問題の解決策を探っています。


要件:

  • サポートされている Docker インストールを実行している必要があります。

  • Docker Manager プラグインがインストールされている必要があります。

  • /admin/upgrade へのアクセス権が必要です。


リポジトリはこちらです:

「いいね!」 43

Wow! That’s quite an accomplishment! I thought it couldn’t be done. Nice work, @joebuhlig!

EDIT: Here’s a question. If you do a rebuild at the command-line, are the procourse-installer plugins upgraded?

「いいね!」 11

Yes – plugins should get upgraded upon bootstrap.

「いいね!」 7

Just wow!
Nice work!

「いいね!」 2

IMO, this deserves to be in core.

「いいね!」 11

So, would it be worth removing my existing plugins from the app.yml file and moving them to this installer?

「いいね!」 1

I have to admit that I’m conflicted on this one. It would really cool to be in core but if it’s in core, installing plugins will only work on Docker installs and non-multisite installs. That would cause problems for a quite a lot of instances.

Technically, it doesn’t matter. They end up being installed in exactly the same way. This just makes it easier to do.

「いいね!」 8

I assume the challenges associated with getting it to work with multisite are far more complex then getting to set up multisite (which none of my clients have deployed) and I’m saying that from managing over 2 dozen active discourse installations.

It should be easier to include this in the standard app.yml on bootstrap for the standalone installs and not including the same in a multisite/multi container/HA setup.

It could always be part of core (with a big warning label that says “only works with docker”) but leave the current install method available as well.

Even better if there’s a way to detect a compatible installation and hide or show itself as necessary.

「いいね!」 5

The main challenge is precompiling assets and such. We’re effectively adding the repo to the /plugins and then running an docker manager upgrade on that specific plugin. That handles the magic side of it.

But in a multisite, you run into issues because you don’t want one instance to be able to make edits for all instances in the multisite.

「いいね!」 6

How i can uninstall a plugin using ssh? Because i installed Moderator Extension and now I cant put it anymore online, Error 502

Assuming you can’t get to the admin panel:

  1. SSH into the server.
  2. cd /var/discourse
  3. ./launcher enter app
  4. vim /shared/tmp/procourse-installer/plugins.txt
  5. Remove the offending plugin from the file.
  6. exit
  7. ./launcher rebuild app
「いいね!」 4

Cant up online :cry:

Looks like your container isn’t running. Try this ./launcher start app

「いいね!」 3

Thank You, my error 502 now are resolved. :smiley:

「いいね!」 2

I think the installer is working fine but I saw this in my error log, not sure if it’s anything but thought I’d might as well bring it up:

NameError (uninitialized class variable @@install_state in ProcourseInstaller::InstallController)
/var/www/discourse/plugins/procourse-installer/app/controllers/procourse_installer/install_controller.rb:4:in `status'
「いいね!」 2

Interesting. Do you have any guesses about what you were doing when that error came to be?

「いいね!」 1

約20日前に、Procourseプラグインと、もう一つのプラグイン(どちらだったか忘れましたが)を、このプラグインインターフェース経由でインストールしました。
数日後、サイトが頻繁に(数日に一度の割合で)極端に遅くなっていることに気づきました。その際、セーフモードでの起動さえ同様に非常に遅く、20〜30分後にようやくサイトの速度が通常に戻りました。

ログを診断する十分なスキルはないのですが、ログ(あるいはSidekiq?)の警告セクションに「procourse」という単語が何度も含まれていたため、Procourseプラグイン内または経由でインストールされたこのプラグインが何らかの原因だと考え、Procourseインターフェースからそのプラグインをアンインストールしました。

しかし、昨日もまた(ほぼ)クラッシュしました。
確認すると、ログの警告に再び「procourse」という単語が多数記載されていました。

そこで今日、Procourse自体もアンインストールすることを決めました。
これで無事になることを祈っています。

それらのエラーのいずれかのバックトレースを共有していただけますか?それが原因を特定するのに役立ちます。

「いいね!」 1

プラグインを一時的にアンインストールしたため、次に発生した際にのみログを送信できます。

(ログが 2〜3 日間保持されるかどうかはわかりませんが、保持されている場合は試してみます)。

ありがとうございます。