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

Make containerized deployment more configurable #1880

Merged
merged 2 commits into from Jul 26, 2018

Conversation

Projects
None yet
2 participants
@flavio
Member

flavio commented Jul 12, 2018

A bunch of changes required to be more flexible when deploying Portus into a containerized environment.

TODO

  • Extend the documentation to mention the new environment variable added. (#1905)
@flavio

This comment has been minimized.

Show comment
Hide comment
@flavio

flavio Jul 12, 2018

Member

I think this should be backported also to the 2.3 branch

Member

flavio commented Jul 12, 2018

I think this should be backported also to the 2.3 branch

Show outdated Hide outdated docker/init
@flavio

This comment has been minimized.

Show comment
Hide comment
@flavio

flavio Jul 20, 2018

Member

@mssola I've updated the code but I haven't tested it. AFAIK .blank? is defined by active support, I fear this is not available at that time. Can you double check?

Member

flavio commented Jul 20, 2018

@mssola I've updated the code but I haven't tested it. AFAIK .blank? is defined by active support, I fear this is not available at that time. Can you double check?

@flavio

This comment has been minimized.

Show comment
Hide comment
@flavio

flavio Jul 20, 2018

Member

Also, which branch holds the documentation?

Member

flavio commented Jul 20, 2018

Also, which branch holds the documentation?

@mssola

This comment has been minimized.

Show comment
Hide comment
@mssola

mssola Jul 20, 2018

Contributor

I've updated the code but I haven't tested it. AFAIK .blank? is defined by active support, I fear this is not available at that time. Can you double check?

I've tested it and nothing broke 😄 That's because we are calling puma from within the context of a Rails application (notice, for example, that we later call ActiveRecord directly 😉). So, it should be fine.

Also, which branch holds the documentation?

It's on the site-source branch, because of an issue we had with jekyll and custom plugins.

Contributor

mssola commented Jul 20, 2018

I've updated the code but I haven't tested it. AFAIK .blank? is defined by active support, I fear this is not available at that time. Can you double check?

I've tested it and nothing broke 😄 That's because we are calling puma from within the context of a Rails application (notice, for example, that we later call ActiveRecord directly 😉). So, it should be fine.

Also, which branch holds the documentation?

It's on the site-source branch, because of an issue we had with jekyll and custom plugins.

@mssola

This comment has been minimized.

Show comment
Hide comment
@mssola

mssola Jul 20, 2018

Contributor

As for the failing integration tests, maybe a rebase does the trick, otherwise we'll have to check what's broken.

Contributor

mssola commented Jul 20, 2018

As for the failing integration tests, maybe a rebase does the trick, otherwise we'll have to check what's broken.

@flavio

This comment has been minimized.

Show comment
Hide comment
@flavio

flavio Jul 20, 2018

Member

Rebased

Member

flavio commented Jul 20, 2018

Rebased

@flavio

This comment has been minimized.

Show comment
Hide comment
@flavio

flavio Jul 24, 2018

Member

@mssola, the patch is not working. I tested it with a containerized image and I got:

undefined method `blank?' for "true":String

I would change the patch to

if ENV["PORTUS_PUMA_HOST"] && ENV["PORTUS_PUMA_USE_UNIX_SOCKET"] != "true"

this works fine.

Member

flavio commented Jul 24, 2018

@mssola, the patch is not working. I tested it with a containerized image and I got:

undefined method `blank?' for "true":String

I would change the patch to

if ENV["PORTUS_PUMA_HOST"] && ENV["PORTUS_PUMA_USE_UNIX_SOCKET"] != "true"

this works fine.

@mssola

This comment has been minimized.

Show comment
Hide comment
@mssola

mssola Jul 26, 2018

Contributor

@flavio tomorrow we want to release 2.3.4, which includes an important fix. Could you update this PR so we can also include this there?

Contributor

mssola commented Jul 26, 2018

@flavio tomorrow we want to release 2.3.4, which includes an important fix. Could you update this PR so we can also include this there?

flavio added some commits Jul 12, 2018

Allow Puma to bind to unix socket also in production
Introduce the `PORTUS_PUMA_USE_UNIX_SOCKET`. Setting this environment
variable will cause puma to use a unix socket instead of binding to a
network port.

Signed-off-by: Flavio Castelli <fcastelli@suse.com>
Make it possible to connect to a database socket
Allow to instantiate a connection with a database listening over a unix
socket.

Signed-off-by: Flavio Castelli <fcastelli@suse.com>
@flavio

This comment has been minimized.

Show comment
Hide comment
@flavio

flavio Jul 26, 2018

Member

@mssola done!

Member

flavio commented Jul 26, 2018

@mssola done!

@mssola

mssola approved these changes Jul 26, 2018

Thanks 👏

@mssola mssola merged commit e886d51 into master Jul 26, 2018

3 checks passed

DCO All commits have a DCO sign-off from the author
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@mssola mssola deleted the make-containerized-deployment-more-configurable branch Jul 26, 2018

@mssola

This comment has been minimized.

Show comment
Hide comment
@mssola

mssola Jul 26, 2018

Contributor

Cherry-picked and pushed into v2.3.

Contributor

mssola commented Jul 26, 2018

Cherry-picked and pushed into v2.3.

mssola added a commit that referenced this pull request Jul 26, 2018

docs: updated the documentation for #1880
The pull request #1880 introduced two new environment variables. This
commit updates the documentation explaining both of them.

Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>

mssola added a commit that referenced this pull request Jul 26, 2018

docs: updated the documentation for #1880
The pull request #1880 introduced two new environment variables. This
commit updates the documentation explaining both of them.

Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>

mssola added a commit that referenced this pull request Jul 26, 2018

Merge pull request #1905 from SUSE/doc-for-1880
docs: updated the documentation for #1880
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment