cn:ccr:cloud:autenticazione_openstack:keystone_wan
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
cn:ccr:cloud:autenticazione_openstack:keystone_wan [2014/01/16 16:57] – [Percona/MySQL with SSL support] aiftim@infn.it | cn:ccr:cloud:autenticazione_openstack:keystone_wan [2014/05/14 19:40] (current) – [Keystone Cluster Setup] aiftim@infn.it | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Keystone - distributed on WAN ====== | ||
+ | ===== Reference Links ===== | ||
+ | - {{: | ||
+ | - [[http:// | ||
+ | - [[http:// | ||
+ | - [[http:// | ||
+ | - [[http:// | ||
+ | - [[http:// | ||
+ | - [[http:// | ||
+ | - [[http:// | ||
+ | |||
+ | ===== Keystone Cluster Setup ===== | ||
+ | |||
+ | |||
+ | {{ : | ||
+ | |||
+ | * Keystone servers: | ||
+ | * keystone 1: keystone.pd.infn.it - 193.206.210.164 | ||
+ | * keystone 2: keystone-infn.lngs.infn.it - 90.147.112.3 | ||
+ | * keystone 3: keystone2.cloud.ba.infn.it - 90.147.102.131 | ||
+ | * HAproxyes | ||
+ | * ha-proxy 1: haproxypd.pd.infn.it - 193.206.210.230 | ||
+ | * ha-proxy 2: keystone-infn-haproxy.lngs.infn.it - 90.147.112.4 | ||
+ | * ha-proxy 3: haproxy.cloud.ba.infn.it - 90.147.102.133 | ||
+ | |||
+ | * Alias for the proxy-nodes - **keystone.ha.infn.it**: | ||
+ | <code bash> | ||
+ | # host keystone.ha.infn.it | ||
+ | keystone.ha.infn.it has address 90.147.102.133 | ||
+ | keystone.ha.infn.it has address 90.147.112.4 | ||
+ | keystone.ha.infn.it has address 193.206.210.230 | ||
+ | </ | ||
+ | |||
+ | ===== Keystone + HAProxy Setup - Installation & Configuration ===== | ||
+ | |||
+ | ==== Open Ports ==== | ||
+ | * on each keystone node: | ||
+ | * 3306, 4444, 4567, 4568 - open to the other 2 keystone-nodes | ||
+ | * 5000, 35357 - open to haproxy-nodes | ||
+ | * on each haproxy-node: | ||
+ | * 5000, 35357 - open for " | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ==== PD setup & logs ==== | ||
+ | * cream-mstr-017 / 193.206.210.47 - KVM master | ||
+ | * CPU - (8) Intel Xeon E5420 2500 | ||
+ | * RAM - 16GB | ||
+ | * Disk - 150GB SAS | ||
+ | * cream-11 / 193.206.210.164 - keystone (primary server) | ||
+ | * Ubuntu 12.04 | ||
+ | * CPU - 2 | ||
+ | * RAM - 2GB | ||
+ | * Disk: vda1 - 20G, vdb1 - 40G | ||
+ | * cert-15 / 193.206.210.164 - haproxy | ||
+ | * Ubuntu 12.04 | ||
+ | * CPU - 2 | ||
+ | * RAM - 2GB | ||
+ | * Disk: vda1 - 20G, vdb1 - 40G | ||
+ | |||
+ | |||
+ | * Configuration log for keystone-server (cream-11) & for haproxy (cert-15): {{: | ||
+ | * Summary of some tests: {{: | ||
+ | |||
+ | |||
+ | ===== Keystone with SSL support ===== | ||
+ | |||
+ | Taking as a starting point [[cn: | ||
+ | - creation of a " | ||
+ | # / | ||
+ | # / | ||
+ | # / | ||
+ | # openssl rsa -in newkey.pem -out newkey_ue.pem | ||
+ | </ | ||
+ | - copy certificates on all keystone nodes: <code bash> | ||
+ | # cp cacert.pem / | ||
+ | # cp newcert.pem / | ||
+ | # cp newkey_ue.pem / | ||
+ | |||
+ | # chmod 400 / | ||
+ | # chown -R keystone: | ||
+ | </ | ||
+ | - modify // | ||
+ | # vi / | ||
+ | [...] | ||
+ | [ssl] | ||
+ | enable = True | ||
+ | certfile = / | ||
+ | keyfile = / | ||
+ | ca_certs = / | ||
+ | cert_required = False | ||
+ | [...] | ||
+ | </ | ||
+ | - restart keystone: <code bash> | ||
+ | # service keystone restart | ||
+ | </ | ||
+ | - on haproxy nodes, change /// | ||
+ | < mode http | ||
+ | < | ||
+ | --- | ||
+ | > # mode http | ||
+ | > mode tcp | ||
+ | > # option httplog | ||
+ | |||
+ | 30c31 | ||
+ | < | ||
+ | --- | ||
+ | > # option httpchk | ||
+ | |||
+ | 40c41 | ||
+ | < | ||
+ | --- | ||
+ | > # option httpchk | ||
+ | |||
+ | 48c49 | ||
+ | < stats enable | ||
+ | --- | ||
+ | > # stats enable | ||
+ | </ | ||
+ | - restart haproxy:< | ||
+ | # haproxy -f / | ||
+ | </ | ||
+ | - some tests: <code bash> | ||
+ | # strace -e connect keystone --os_auth_url https:// | ||
+ | --- SIGCHLD (Child exited) @ 0 (0) --- | ||
+ | --- SIGCHLD (Child exited) @ 0 (0) --- | ||
+ | connect(3, {sa_family=AF_FILE, | ||
+ | connect(3, {sa_family=AF_FILE, | ||
+ | connect(3, {sa_family=AF_INET, | ||
+ | connect(3, {sa_family=AF_INET, | ||
+ | connect(3, {sa_family=AF_INET, | ||
+ | connect(3, {sa_family=AF_INET, | ||
+ | connect(3, {sa_family=AF_UNSPEC, | ||
+ | connect(3, {sa_family=AF_INET, | ||
+ | connect(3, {sa_family=AF_UNSPEC, | ||
+ | connect(3, {sa_family=AF_INET, | ||
+ | connect(4, {sa_family=AF_INET, | ||
+ | connect(4, {sa_family=AF_INET, | ||
+ | connect(4, {sa_family=AF_UNSPEC, | ||
+ | connect(4, {sa_family=AF_INET, | ||
+ | connect(4, {sa_family=AF_UNSPEC, | ||
+ | connect(4, {sa_family=AF_INET, | ||
+ | connect(3, {sa_family=AF_INET, | ||
+ | No handlers could be found for logger " | ||
+ | +----------------------------------+-------------+---------+ | ||
+ | | id | | ||
+ | +----------------------------------+-------------+---------+ | ||
+ | | 0239ea1049444a87987ce4275e0aac8f | testreplica | True | | ||
+ | | ae8ccba0393b4038b50d590a90df94a8 | demo | True | | ||
+ | +----------------------------------+-------------+---------+ | ||
+ | |||
+ | # keystone --endpoint https:// | ||
+ | +----------------------------------+-------------+---------+ | ||
+ | | id | | ||
+ | +----------------------------------+-------------+---------+ | ||
+ | | 0239ea1049444a87987ce4275e0aac8f | testreplica | True | | ||
+ | | 3d8c9bb15e084bbaa49d4e8af0162a06 | pdtest | ||
+ | | a025708e981e40389a0d2e76e4709ebb | service | ||
+ | | ae8ccba0393b4038b50d590a90df94a8 | demo | True | | ||
+ | +----------------------------------+-------------+---------+ | ||
+ | # keystone --endpoint https:// | ||
+ | +----------------------------------+---------+-------------------------------+--------+ | ||
+ | | id | enabled | | ||
+ | +----------------------------------+---------+-------------------------------+--------+ | ||
+ | | 924293d12b824286a4aef61c909ccc11 | True | stefano.stalio@lngs.infn.it | ||
+ | | a92f4071351d4d8b8db84b3834445d0d | True | cristina.aiftimiei@pd.infn.it | caifti | | ||
+ | | c32d5b9e3b274734972134152fa829c4 | True | stefano.stalio@lngs.infn.it | ||
+ | | d7d369c91269494b804192248dab6632 | True | marica.antonacci@ba.infn.it | ||
+ | +----------------------------------+---------+-------------------------------+--------+ | ||
+ | |||
+ | </ | ||
+ | ===== Percona/ | ||
+ | |||
+ | Following [[http:// | ||
+ | |||
+ | - copy on each keystone node the " | ||
+ | # mkdir -p / | ||
+ | # mv *.pem / | ||
+ | # chown mysql:mysql / | ||
+ | # chmod 644 / | ||
+ | # chmod 400 / | ||
+ | </ | ||
+ | - modify my.conf file, to add new param // | ||
+ | # grep wsrep_provider_options / | ||
+ | wsrep_provider_options=" | ||
+ | </ | ||
+ | - stop mysql on all nodes:< | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | - on <pd> node change // | ||
+ | # sed -i \ | ||
+ | -e " | ||
+ | -e " | ||
+ | </ | ||
+ | - start mysql on all nodes:< | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | - on <pd> node change **back** // | ||
+ | # sed -i \ | ||
+ | -e " | ||
+ | -e " | ||
+ | </ | ||
+ | - after few secs on the log everything is ok:<code bash> | ||
+ | # tail -f / | ||
+ | 140116 17:35:07 [Note] WSREP: SSL handshake successful, remote endpoint ssl:// | ||
+ | 140116 17:35:08 [Note] WSREP: SSL handshake successful, remote endpoint ssl:// | ||
+ | [...] | ||
+ | 140116 17:35:08 [Note] WSREP: STATE_EXCHANGE: | ||
+ | 140116 17:35:08 [Note] WSREP: STATE EXCHANGE: sent state msg: 29842596-7ecc-11e3-9622-4f94cb3a9ab0 | ||
+ | 140116 17:35:08 [Note] WSREP: STATE EXCHANGE: got state msg: 29842596-7ecc-11e3-9622-4f94cb3a9ab0 from 0 (cream-11) | ||
+ | 140116 17:35:08 [Note] WSREP: STATE EXCHANGE: got state msg: 29842596-7ecc-11e3-9622-4f94cb3a9ab0 from 1 (keystone-infn) | ||
+ | 140116 17:35:08 [Note] WSREP: STATE EXCHANGE: got state msg: 29842596-7ecc-11e3-9622-4f94cb3a9ab0 from 2 (keystone2) | ||
+ | 140116 17:35:08 [Note] WSREP: Quorum results: | ||
+ | version | ||
+ | component | ||
+ | conf_id | ||
+ | members | ||
+ | act_id | ||
+ | last_appl. = 0, | ||
+ | protocols | ||
+ | group UUID = 6e12b786-6316-11e3-be17-57dea5f4d77d | ||
+ | [...] | ||
+ | </ | ||
+ | - some tests | ||
+ | * status before tests:< | ||
+ | mysql(PD)> | ||
+ | [...] | ||
+ | mysql(PD)> | ||
+ | +-------------------+ | ||
+ | | Tables_in_percona | | ||
+ | +-------------------+ | ||
+ | | example | ||
+ | +-------------------+ | ||
+ | 1 row in set (0.00 sec) | ||
+ | </ | ||
+ | * new table is created at <ba>, query DB at < | ||
+ | mysql(PD)> | ||
+ | +-------------------+ | ||
+ | | Tables_in_percona | | ||
+ | +-------------------+ | ||
+ | | example | ||
+ | | test | | ||
+ | +-------------------+ | ||
+ | 2 rows in set (0.00 sec) | ||
+ | </ | ||
+ | * new values are inserted at < | ||
+ | mysql(LNGS)> | ||
+ | [...] | ||
+ | mysql(LNGS)> | ||
+ | [...] | ||
+ | |||
+ | mysql(PD)> | ||
+ | +---------+-----------+ | ||
+ | | node_id | node_name | | ||
+ | +---------+-----------+ | ||
+ | | 1 | percona1 | ||
+ | | 2 | ssl | | ||
+ | +---------+-----------+ | ||
+ | 2 rows in set (0.00 sec) | ||
+ | </ |