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

Does Bamboo support zookeeper authentication? #243

Open
mrz001 opened this issue Oct 17, 2017 · 5 comments
Open

Does Bamboo support zookeeper authentication? #243

mrz001 opened this issue Oct 17, 2017 · 5 comments

Comments

@mrz001
Copy link

mrz001 commented Oct 17, 2017

I have seen Mesos support ZK authentication like zk://username:password@host1:port1,host2:port2,.../path and Marathon suppoer ZK authentication like zk://user@pass:host1:port1,user@pass:host2:port2,.../path. How about Bamboo BAMBOO_ZK_HOST?

@j1n6
Copy link
Contributor

j1n6 commented Oct 17, 2017 via email

@mrz001
Copy link
Author

mrz001 commented Oct 17, 2017

How to set BAMBOO_ZK_HOST?

@j1n6
Copy link
Contributor

j1n6 commented Oct 17, 2017

it would be the same format:

zk://username:password@host1:port1,host2:port2,.../path

@mrz001
Copy link
Author

mrz001 commented Oct 18, 2017

I have set BAMBOO_ZK_HOST=dcos:dcos@172.24.4.112:2181,172.24.4.113:2181,172.24.4.114:2181 ,
but it still shows "zk: not authenticated".

  • set -ex
  • export HA_PORT=20011
  • dockerize -template /opt/bamboo/config/haproxy.tmplt.cfg.dockerize:/opt/bamboo/config/haproxy_template.cfg
  • cat /opt/bamboo/config/haproxy_template.cfg
  • cat /opt/bamboo/config/haproxy.tmplt.cfg.bamboo
  • export HAPROXY_STATS_USERNAME=admin
  • export HAPROXY_STATS_PASSWORD=admin
  • export HAPROXY_STATS_ENDPOINT=/haproxy_stats
  • export HAPROXY_PORT=20011
  • export HAPROXY_STATS_PORT=9001
  • /usr/local/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /var/run/haproxy.pid
    [WARNING] 290/124510 (13) : config : log format ignored for frontend 'http-stats' since it has no log address.
    [WARNING] 290/124510 (13) : config : log format ignored for frontend 'http-in' since it has no log address.
    [WARNING] 290/124510 (13) : stats socket will not work as expected in multi-process mode (nbproc > 1), you should force process binding globally using 'stats bind-process' or per socket using the 'process' attribute.
    [WARNING] 290/124510 (13) : Proxy 'http-stats': in multi-process mode, stats will be limited to process assigned to the current request.
  • /opt/bamboo/bamboo -config=/opt/bamboo/config/production.json -bind=:8001
    2017/10/18 12:45:10 Using environment override MARATHON_ENDPOINT=http://172.24.4.112:8081,http://172.24.4.113:8081,http://172.24.4.114:8081
    2017/10/18 12:45:10 Using environment override MARATHON_USER=dcos
    2017/10/18 12:45:10 Using environment override MARATHON_PASSWORD=dcos
    2017/10/18 12:45:10 Environment variable not set: MARATHON_USE_EVENT_STREAM
    2017/10/18 12:45:10 Using environment override BAMBOO_ENDPOINT=http://172.24.4.112:8001
    2017/10/18 12:45:10 Using environment override BAMBOO_ZK_HOST=dcos:dcos@172.24.4.112:2181,172.24.4.113:2181,172.24.4.114:2181
    2017/10/18 12:45:10 Using environment override BAMBOO_ZK_PATH=/bamboo8081
    2017/10/18 12:45:10 Environment variable not set: STATSD_ENABLED
    2017/10/18 12:45:10 Starting update loop
    2017/10/18 12:45:10 bamboo_startup => 2017-10-18T12:45:10+08:00
    2017/10/18 12:45:10 Queuing an haproxy update.
    panic: zk: not authenticated

@mrz001
Copy link
Author

mrz001 commented Oct 18, 2017

I find there is a TODO list in bamboo/configuration/zookeeper.go .

package configuration

import (
"strings"
"time"
)

/*
Zookeeper configuration set
*/
type Zookeeper struct {
// comma separated host:port connection strings set
Host string
// zookeeper path
Path string
// Delay n seconds to report change event
ReportingDelay int64

// TODO: authentication parameters for zookeeper

}

func (zk Zookeeper) Delay() time.Duration {
return time.Duration(zk.ReportingDelay) * time.Second
}

func (zk Zookeeper) ConnectionString() []string {
return strings.Split(zk.Host, ",")
}

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

No branches or pull requests

2 participants