Instalador do ProCourse

Este plugin foi projetado para tornar extremamente fácil instalar novos plugins sem fazer login no servidor. Ele adiciona uma tela em /admin/plugins/procourse-installer que se parece com esta:

A partir daí, você pode inserir a URL (com ou sem .git) do repositório git do plugin e clicar em Instalar Plugin. Aguarde alguns minutos (cerca de 5 minutos) para que a instalação seja concluída e você estará pronto para usar.

Para ver todos os plugins que você instalou através do instalador ou para remover um plugin, basta ir para Plugins Instalados.


Algumas observações:

  • Esses plugins permanecem após uma reconstrução ou inicialização (bootstrap) de app ou web_only.

  • Atualmente, não foi testado em instâncias multisite e provavelmente falhará nesses cenários, pois o plugin precisa de acesso ao diretório /plugins do aplicativo para funcionar.

  • Os plugins instalados aparecerão em /admin/plugins.

  • Você PODE atualizar esses plugins normalmente em /admin/upgrade.

  • Durante o desenvolvimento deste plugin, identificamos um erro potencial ao remover traduções de plugins. Isso pode fazer com que o site exiba um erro se o usuário visitar uma página onde a tradução é usada. Isso parece ocorrer mesmo se você usar admin/upgrade para atualizar um plugin específico e o plugin tiver removido uma tradução. Estamos trabalhando para encontrar uma solução para isso no momento.


Requisitos:

  • Você deve estar executando uma instalação Docker suportada.

  • O plugin Docker Manager deve estar instalado.

  • Acesso a /admin/upgrade.


O repositório pode ser encontrado aqui:

43 curtidas

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 curtidas

Yes – plugins should get upgraded upon bootstrap.

7 curtidas

Just wow!
Nice work!

2 curtidas

IMO, this deserves to be in core.

11 curtidas

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

1 curtida

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 curtidas

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 curtidas

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 curtidas

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 curtidas

image

Cant up online :cry:

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

3 curtidas

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

2 curtidas

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 curtidas

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

1 curtida

Há cerca de 20 dias, instalei este plugin Procourse e outro plugin (não me lembro qual era) através da interface de plugins.

Depois de alguns dias, percebi que, várias vezes (digamos, uma vez a cada poucos dias), meu site ficava extremamente lento. Nesses momentos, até mesmo a abertura no modo de segurança ficava igualmente lenta. Após 20 a 30 minutos, percebi que a velocidade do meu site voltava ao normal.

Embora eu não tenha as habilidades necessárias para analisar os logs, como a seção de avisos dos logs (ou seria do Sidekiq?) continha a palavra ‘procourse’ tantas vezes, achei que isso estava de alguma forma relacionado ao plugin instalado dentro/através do plugin Procourse. Por isso, desinstalei aquele plugin pela interface do Procourse.

Mas ontem, o site quase travou novamente.

Verifiquei e, novamente, encontrei a palavra ‘procourse’ escrita em muitos e muitos avisos nos logs.

Então, hoje, tomei a decisão de desinstalar também o Procourse.

Agora, estou torcendo muito.

Você pode compartilhar o backtrace de um desses erros? Isso nos ajudaria a identificar a origem do problema.

1 curtida

Como desinstalei o plugin por enquanto, só poderei enviar os logs na próxima ocorrência.

(Não sei se os logs são mantidos por 2 ou 3 dias; se forem, posso tentar).

Obrigado.