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

mysql/postgres support #453

Closed
deniseschannon opened this issue May 7, 2019 · 2 comments
Closed

mysql/postgres support #453

deniseschannon opened this issue May 7, 2019 · 2 comments
Assignees
Labels
kind/enhancement An improvement to existing functionality
Milestone

Comments

@deniseschannon
Copy link

No description provided.

@deniseschannon deniseschannon added the kind/enhancement An improvement to existing functionality label May 7, 2019
@deniseschannon deniseschannon added this to the v0.6.0 milestone May 7, 2019
@huapox
Copy link

huapox commented May 8, 2019

That wonderful, by the way with a suggest/question will k3s supports rqlite?

@erikwilson
Copy link
Contributor

To test this enhancement I first created certs for etcd3 which include a SAN for 10.0.0.2 using the following instructions:
https://github.com/kelseyhightower/etcd-production-setup

etcd3

To launch an etcd3 server using those certs:

docker run --name etcd \
   -v `pwd`/etcd-ca:/etcd-ca \
   -p 127.0.0.1:2379:2379 \
   -p 127.0.0.1:2380:2380 \
   -e ALLOW_NONE_AUTHENTICATION=yes \
   -e ETCD_LISTEN_CLIENT_URLS=https://0.0.0.0:2379 \
   -e ETCD_ADVERTISE_CLIENT_URLS=https://10.0.2.2:2379 \
   -e ETCD_CERT_FILE=/etcd-ca/certs/etcd0.example.com.crt \
   -e ETCD_KEY_FILE=/etcd-ca/private/etcd0.example.com.key \
   -e ETCD_CA_FILE=/etcd-ca/certs/ca.crt \
   -d bitnami/etcd:latest

And from within a Valgrant alpine instance etcd3 tested with:

INSTALL_K3S_SKIP_DOWNLOAD=true ./install.sh \
   --storage-backend etcd3 \
   --storage-endpoint https://10.0.2.2:2379 \
   --storage-cafile `pwd`/etcd-ca/certs/ca.crt \
   --storage-certfile `pwd`/etcd-ca/certs/etcd-client.crt \
   --storage-keyfile `pwd`/etcd-ca/private/etcd-client.key

mysql

Launching a mysql service using the same etcd certs:

docker run --name mysql \
   -v `pwd`/etcd-ca/:/etcd-ca \
   -p 127.0.0.1:3306:3306 \
   -e MYSQL_ROOT_PASSWORD=secret \
   -d mysql:latest \
       --require-secure-transport=ON \
       --ssl-ca /etcd-ca/certs/ca.crt \
       --ssl-cert /etcd-ca/certs/etcd0.example.com.crt \
       --ssl-key /etcd-ca/private/etcd0.example.com.key

And from within a Valgrant alpine instance mysql tested with:

INSTALL_K3S_SKIP_DOWNLOAD=true ./install.sh \
   --storage-endpoint='mysql://root:secret@tcp(10.0.2.2:3306)/testdb' \
   --storage-cafile `pwd`/etcd-ca/certs/ca.crt \
   --storage-certfile `pwd`/etcd-ca/certs/etcd-client.crt \
   --storage-keyfile `pwd`/etcd-ca/private/etcd-client.key

postgres

Launching a postgres service using the same etcd certs:

docker run --name postgres \
   -v `pwd`/etcd-ca/:/etcd-ca \
   -p 127.0.0.1:5432:5432 \
   -e POSTGRES_USER=root \
   -e POSTGRES_PASSWORD=secret \
   -d postgres:latest \
      -c ssl=on \
      -c ssl_ca_file=/etcd-ca/certs/ca.crt \
      -c ssl_cert_file=/etcd-ca/certs/etcd0.example.com.crt \
      -c ssl_key_file=/etcd-ca/private/etcd0.example.com.key

And from within a Valgrant alpine instance postgres tested with:

INSTALL_K3S_SKIP_DOWNLOAD=true ./install.sh \
   --storage-endpoint='postgres://root:secret@10.0.2.2:5432/testdb' \
   --storage-cafile `pwd`/etcd-ca/certs/ca.crt \
   --storage-certfile `pwd`/etcd-ca/certs/etcd-client.crt \
   --storage-keyfile `pwd`/etcd-ca/private/etcd-client.key

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement An improvement to existing functionality
Projects
None yet
Development

No branches or pull requests

5 participants