Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: If I build the container using the following compose file there seems to be no official Taiga documentation for adding my own contribPlugins to taiga-frontend. #7

Closed
Leopere opened this issue Aug 25, 2019 · 38 comments
Assignees
Labels
FEATURE New feature or request

Comments

@Leopere
Copy link

Leopere commented Aug 25, 2019

version: '3.7'

services:
  taiga:
#    image: quay.io/riotkit/taiga:4.2.7
    build:
      context: ./docker-taiga/
      #dockerfile: .
      args:
        - TAIGA_BACK_VERSION=4.2.13
        - TAIGA_FRONT_VERSION=4.2.13-stable
    networks:
      - traefik
      - default
    volumes:
      - ./media:/usr/src/taiga-back/media
    environment:
      TAIGA_SECRET_KEY: secret
      TAIGA_HOSTNAME: taiga.REDACTED
      TAIGA_SCHEME: https
      TAIGA_DB_NAME: taiga
      TAIGA_DB_USER: taiga
      TAIGA_DB_HOST: postgres
      TAIGA_DB_PASSWORD: dbpassword
      TAIGA_ENABLE_EMAIL: 'True'
      TAIGA_EMAIL_FROM: REDACTED
      TAIGA_EMAIL_USE_TLS: 'True'
      TAIGA_EMAIL_HOST: REDACTED
      TAIGA_EMAIL_PORT: 465
      TAIGA_EMAIL_USER: REDACTED
      TAIGA_EMAIL_PASS: REDACTED
    #deploy:
    labels:
      - "traefik.backend=taiga"
      - "traefik.docker.network=traefik"
      - "traefik.frontend.rule=Host:taiga.REDACTED"
      - "traefik.enable=true"
      - "traefik.port=80"

  postgres:
    image: postgres
    environment:
      POSTGRES_DB: taiga
      POSTGRES_USER: taiga
      POSTGRES_PASSWORD: dbpassword
    volumes:
      - ./postgres:/var/lib/postgresql/data
      
volumes:
  postgres:
  media:
    
networks:
  traefik:
    external: true

Any ideas as to how to get contribPlugins working?

@zicklag
Copy link
Contributor

zicklag commented Aug 25, 2019

We'll have to add support to for adding a list of contribPlugins to the conf.json file to this container. That would be a simple change. The bigger problem is deciding how to allow users of the container to add plugins. What plugin are you wanting to install? ( So I can look at the installation instructions )

@Leopere
Copy link
Author

Leopere commented Aug 25, 2019 via email

@zicklag
Copy link
Contributor

zicklag commented Aug 25, 2019

Oh, that's super easy. Those importers are actually built-in and just have to be enabled in the config file. We can add environment variables that allow you to enable/disable those importers.

@Leopere
Copy link
Author

Leopere commented Aug 25, 2019 via email

@Leopere
Copy link
Author

Leopere commented Aug 25, 2019

This comment seems to relate to #3 so just mentioning it in this feed for the sake of consistency.

@blackandred
Copy link
Contributor

Could you propose anything @zicklag, I mean some code/PR? I didn't dive into this topic yet.

@zicklag
Copy link
Contributor

zicklag commented Aug 26, 2019

I should be able to open a PR soon.

@Leopere
Copy link
Author

Leopere commented Aug 26, 2019

This is all I could find pointing to contribPlugins in their official documentation for Taiga.io

@Leopere
Copy link
Author

Leopere commented Aug 26, 2019

Oh, and one other detail, if we're going to have this assert a bunch of things into how Taiga runs we should define an order of precedence so that if someone has modified the configuration in various ways like a volume'd config or something of the sort we should respect that by default.

@zicklag
Copy link
Contributor

zicklag commented Aug 26, 2019

Right now, all of the Taiga settings ( at least the Taiga back settings ) that are set by the container are in a docker-settings.py file that is included into the local.py settings file. If you wanted to replace the local.py file with your own file in a Docker volume, then all of the settings in there would take precedence over the ones set in the docker-settings.py file.

Also, most, if not all, of the settings set in docker-settings.py are configuable through environment variables, so if you want to change them, you can change them without having to mount a config file or rebuild the container.

When I create the PR for enabling the other importers I'll have them on by default and provide environment variables that allows you to chose which ones to disable/enable.

@Leopere
Copy link
Author

Leopere commented Sep 2, 2019

This sounds like the kind of behavior that I would hope to expect. I'm kind of miffed that out of all of the best practices that Docker people write they don't discuss the order of precedence when it comes to designing an ideal Dockerfile.

@blackandred
Copy link
Contributor

blackandred commented Sep 29, 2019

Any news on this? 😉

I got a request on the Slack plugin in the Taiga image, I don't know if you have already some progress? 🙂

@zicklag
Copy link
Contributor

zicklag commented Sep 29, 2019

No, I haven't done anything for it. :)

If I remember right, the best idea was just to have something like a pugins.d directory that all of the shell scripts put in that directory would be run by the entrypoint at startup. That would mean that you could do whatever kind of setup was necessary to install whatever plugins you wanted.

I don't think Taiga plugins are standardized enough to have a universal plugin install method.

@blackandred
Copy link
Contributor

blackandred commented Sep 29, 2019 via email

@zicklag
Copy link
Contributor

zicklag commented Sep 29, 2019

I agree with that. I wasn't sure if you wanted to be able to install arbitrary plugins at runtime or not, but I would definitely opt for creating derivative images if you need custom plugins.

Otherwise, integrating more commonly useful plugins such as LDAP seems like a good idea if somebody has the need for it and doesn't mind contributing.

It wasn't hard for me to add LDAP support. I pretty much just followed the installation instructions and added the environment configuration scripts.

@blackandred
Copy link
Contributor

I don't think there are a lot of contrib plugins. We can do an infrastructure for plugins, then on request (when issue will be created) add plugins with acceptance (unstable plugins should not be accepted, as we will have difficulties to maintain the image, and deletion of a non-building plugin later could be a breaking change).

@blackandred
Copy link
Contributor

Ah, and at first we can just add Slack with such method.

@blackandred blackandred added the FEATURE New feature or request label Oct 2, 2019
@blackandred
Copy link
Contributor

@zicklag Could I assign you to this?

@zicklag
Copy link
Contributor

zicklag commented Oct 2, 2019

I'm not sure when I would be able to get to it. I've been a bit busy, but if you wanted to assign it to me I could do it if I do find the time.

@Leopere
Copy link
Author

Leopere commented Oct 2, 2019 via email

@blackandred
Copy link
Contributor

We can be assigned both, haha. So we will see who will start it 😄

@Leopere
Copy link
Author

Leopere commented Oct 2, 2019

The main plugin I would love is taiga's trello sync plugin. If we get any more then that's excellent. I don't think this feature add has to be extensive just check if someone has changed a variable from it's default TAIGA_PLUGIN=${TAIGA_PLUGIN:-FALSE} if it doesn't switch from FALSE to TRUE then don't bother adding the plugin. Then you could build the APP on container init. Unless of course that would be super slow.

@zicklag
Copy link
Contributor

zicklag commented Oct 2, 2019

The Trello importer is actually already merged. It came with #12.

@Leopere
Copy link
Author

Leopere commented Oct 2, 2019

Shows how often I'm updating my in-dev containers. I have a constant sprawl of web-apps that I'm testing in my docker-compose micro services cluster. Taiga is one of the ones that've been in my list of todo for ages.

@unixfox
Copy link
Contributor

unixfox commented Nov 11, 2019

I would love to see the slack plugin added :).

@blackandred
Copy link
Contributor

I would love to see the slack plugin added :).

ACK :)
Will try to find a time this week to implement it, and by the way improve the versioning.

@Leopere
Copy link
Author

Leopere commented Nov 11, 2019

Just for the sake of taking care of anyone who searches up how to do this in the future can we have a proper docker-compose.yml example posted in this thread. Even modifying my example I posted to open the thread.

@Sceat
Copy link

Sceat commented Nov 12, 2019

subbed! really need the slack contrib :)

@blackandred
Copy link
Contributor

I'm working on it.

@blackandred
Copy link
Contributor

plugins-2
plugins-1

Sorry, that it is taking so long, I had to take care about my backup servers at first, then get back to this project.

I'm on the way, will be testing this possibly tommorow.

blackandred added a commit that referenced this issue Nov 27, 2019
@blackandred
Copy link
Contributor

I almost implemented it. The frontend currently does not install properly, it's just a lack of my time - I need to spend an one hour next day to have it finished and tested. I guess, that's my estimation.

The plugin system will install everything at build time, and let the devops decide on container startup which plugins to enable.

@Leopere
Copy link
Author

Leopere commented Nov 27, 2019

Makes sense honestly the inclusion of the plugins probably doesn't really increase the build size that much and if they're really concerned about the containers being that small they should likely be using a different solution. Taiga really doesn't seem lightweight on usage.

@blackandred
Copy link
Contributor

Ok, I'm testing it. I released a first RC. If something would be wrong I would release another RC, when it will be stable I will tag a normal version 1.0 of the container

https://github.com/riotkit-org/docker-taiga/releases/tag/1.0-RC1

@blackandred
Copy link
Contributor

If everything will be ok, then the RC should be on quay as an RC version.

@blackandred
Copy link
Contributor

Damn, actually the CI is blocked because Taiga.io released backend v5.0.0 and frontend v5.0.1 and they didn't release frontend v5.0.0. Assumption that frontend version == backend version seems to be wrong. I will have figure out some solution that would pick next closest release.

@blackandred
Copy link
Contributor

slack

It seems that locally I got it working. Trying to make the CI working.

I created an additional ticket:
#23

@blackandred
Copy link
Contributor

Hi! Please check new builds on Quay, the plugins support is there. Also all versions are building now. The #23 was resolved.

Closing now. Please open a new issue in case that something would not work. Thanks 🙂

@blackandred
Copy link
Contributor

I invite you to check the recent stable release - 1.0 of the image - quay.io/riotkit/taiga:5.0.2-b1.0, https://github.com/riotkit-org/docker-taiga/releases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FEATURE New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants