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

Ubuntu20 redash #316

Merged
60 commits merged into from
Apr 20, 2022
Merged

Ubuntu20 redash #316

60 commits merged into from
Apr 20, 2022

Conversation

ghost
Copy link

@ghost ghost commented Sep 30, 2021

This PR updates salt to deploy redash on the new ocp14 server running ubuntu 20.04 #145

I have also taken this opportunity to move postgres out of docker and upgrade it (closes #299). Because of this change and specifically vm.overcommit_memory, the memory requirements on this server has increased to needing at least 6GB SWAP / 4GB RAM (from 2GB SWAP / 4GB RAM)

Few tasks are remaining before this is merged in:

@jpmckinney / @yolile , I can see redash is configured to send email through SES, what is this used for? If I import the database from ocp08 for testing will it trigger any emails?

Copy link
Member

@jpmckinney jpmckinney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the docker-compose file, the differences are:

  • remove postgres
  • upgrade redis and add healthcheck
  • change docker-compose file version
  • change docker image tag

salt/top.sls Outdated Show resolved Hide resolved
salt/redash/init.sls Outdated Show resolved Hide resolved
salt/redash/init.sls Outdated Show resolved Hide resolved
salt/redash/init.sls Outdated Show resolved Hide resolved
salt/redash/files/env Outdated Show resolved Hide resolved
salt/redash/files/env Outdated Show resolved Hide resolved
salt/postgres/files/conf/redash.conf Outdated Show resolved Hide resolved
salt/onboarding.sls Outdated Show resolved Hide resolved
salt-config/roster Outdated Show resolved Hide resolved
pillar/redash.sls Outdated Show resolved Hide resolved
@ghost
Copy link
Author

ghost commented Nov 23, 2021

@jpmckinney , this PR is ready to review.

I have...

  • Updated redash to use docker_apps
  • Added netplan configuration enabling us to configure IPv6 on Linode servers
  • With the netplan changes, I have added configs to registry addressing issue Registry network (netplan) configuration #278
  • Updated documentation around onboarding and created docs for netplan
  • Updated redash version for the new stable release
  • Updated redash documentation for new setup and processes.

I have also imported the database from the old server onto ocp14 and tested, confirming the app is working fine :)

@ghost
Copy link
Author

ghost commented Dec 15, 2021

Noting migration steps:

  1. Merge PR and changes in private repo
  2. Follow Documented "Initialize Redash" process
  3. Copy over database from OCP with one additional step:
sed -i 's/OWNER TO postgres/OWNER TO redash/g; /COMMENT ON DATABASE postgres/d' redash.sql
  1. Update Redash DB secret key
docker-compose run --rm server manage database reencrypt "old_secret_key" "new_secret_key"
  1. Update DNS

Edit: Updated steps for latest process.

salt/redash.sls Outdated Show resolved Hide resolved
pillar/redash.sls Outdated Show resolved Hide resolved
pillar/redash.sls Outdated Show resolved Hide resolved
pillar/redash.sls Outdated Show resolved Hide resolved
@ghost ghost requested a review from jpmckinney March 28, 2022 10:03
Copy link
Member

@jpmckinney jpmckinney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost there!

docs/deploy/create_server.rst Outdated Show resolved Hide resolved
dhcp6: no
accept-ra: no
addresses:
{#- networkd makes the latest IP the primary IP so order matters here #}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume "latest" means "last"? I changed it to avoid ambiguity.

That said, https://www.linode.com/docs/guides/linux-static-ip-configuration/#ubuntu-1804-and-2004 puts the SLAAC address last. It also includes a private IP. I don't know if "IPv6 – Link Local" in Linode matches that private IP or is something else.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume "latest" means "last"? I changed it
✔✔

In my testing I've had lots of issues due to the ordering the IPv6 IPs. The config in this PR is the most reliable set up.
As I remember, putting SLAAC last will prioritise the other IPv6 address (from the Linode pool) over our IPv6 pool.
The server picks up the Link Local address automatically so no need for manual configuration.

Copy link
Member

@jpmckinney jpmckinney Apr 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm having trouble finding documentation about the priority order. This thread suggests that the first entry is prioritized, not the last: https://bugs.launchpad.net/netplan/+bug/1766656

The manpage for systemd-network doesn't seem to describe any ordering logic: https://manpages.ubuntu.com/manpages/bionic/man5/systemd.network.5.html

I read the Address= description, and searched for first, last, order, priorit*, primary, secondary, additional, prefer.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyhow, the logic seems to be undocumented/unspecified, so if this config works, let's go ahead with the merge. I've added comments to the file, in case we later discover documented logic.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed - the documentation around Netplan is poor.
I'm happy that this configuration is working fine on OCP14.
I will merge this PR tomorrow morning (20 Apr 2022). :)

@ghost ghost merged commit a8c4b5f into main Apr 20, 2022
@ghost ghost deleted the ubuntu20-redash branch April 20, 2022 09:01
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade PostgreSQL on Redash
1 participant