Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Discover jenkins with autoip host name instead of host:port #249

Merged
merged 3 commits into from
Jun 22, 2018

Conversation

takirala
Copy link
Contributor

@takirala takirala commented Jun 19, 2018

Address COPS-3395

@@ -30,7 +30,8 @@ def populate_jenkins_config_xml(config_xml, master, name, host, port, role, user

_find_and_set(mesos, './master', master)
_find_and_set(mesos, './frameworkName', name)
_find_and_set(mesos, './jenkinsURL', "http://{}:{}".format(host, port))
# This used to be host and port. Switching over to DNS Name to address COPS-3395.
_find_and_set(mesos, './jenkinsURL', "http://{}.marathon.autoip.dcos.thisdcos.directory".format(name))
Copy link
Contributor

Choose a reason for hiding this comment

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

Can the format string ("http://{}.marathon.autoip.dcos.thisdcos.directory") be a constant at the top of the file? It is used again on line 121.

@@ -12,7 +12,7 @@
import xml.etree.ElementTree as ET


def populate_jenkins_config_xml(config_xml, master, name, host, port, role, user):
def populate_jenkins_config_xml(config_xml, master, name, role, user):
Copy link
Contributor

Choose a reason for hiding this comment

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

The function documentation needs updated with these changes.

@@ -30,7 +30,8 @@ def populate_jenkins_config_xml(config_xml, master, name, host, port, role, user

_find_and_set(mesos, './master', master)
_find_and_set(mesos, './frameworkName', name)
_find_and_set(mesos, './jenkinsURL', "http://{}:{}".format(host, port))
# This used to be host and port. Switching over to DNS Name to address COPS-3395.
_find_and_set(mesos, './jenkinsURL', "http://{}.marathon.autoip.dcos.thisdcos.directory".format(name))
Copy link
Contributor

Choose a reason for hiding this comment

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

The Universe config for Jenkins defines two ports and this used to specifically use the nginx port. How is the DNS address selecting the correct port?

@@ -158,7 +159,7 @@ def _get_xml_root(config_xml):
return tuple([tree, root])


def _find_and_set(element, term, new_text):
def _find_and_set(element, term, new_text, write_if_empty=False):
Copy link
Contributor

Choose a reason for hiding this comment

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

Please update the pydoc with the new argument.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@colin-msphere
Copy link
Contributor

What versions of DC/OS support the autoip DNS?

@takirala
Copy link
Contributor Author

@colin-msphere I think 1.8 and above.
1.8
1.9
1.10
1.11
cc @jeid64

@takirala takirala merged commit 742d1cc into master Jun 22, 2018
@takirala takirala deleted the use-autoip branch June 22, 2018 18:35
colin-msphere added a commit that referenced this pull request Jun 26, 2018
* Update mesos plugin hash to include instrumentation

* Update default agent to 0.6.0 (#207)

* Update mesos plugin (#210)

* Update jackson plugin to latest

* Discover jenkins with autoip host name instead of host:port (#249)

Address [COPS-3395](https://jira.mesosphere.com/browse/COPS-3395)

* Always update the URL in mesos cloud config (#252)

* Always update the URL in mesos cloud config

The assigned port is dynamic and may change between runs.

* Always update Jenkins URL
kvish added a commit that referenced this pull request Sep 29, 2019
* Fixes from master applied to 3.5.x (#251)

* Update mesos plugin hash to include instrumentation

* Update default agent to 0.6.0 (#207)

* Update mesos plugin (#210)

* Update jackson plugin to latest

* Discover jenkins with autoip host name instead of host:port (#249)

Address [COPS-3395](https://jira.mesosphere.com/browse/COPS-3395)

* Always update the URL in mesos cloud config (#252)

* Always update the URL in mesos cloud config

The assigned port is dynamic and may change between runs.

* Always update Jenkins URL

* Update CHANGELOG for 3.5.1 (#253)

* Changed Jenkins URL to support Jenkins when deployed to a MoM. (#261)

* Fixing Mesos DNS name handling. (#273)

* [COPS-4290] Bump jenkins base version and plugins (#283)

* bump jenkins base tech 2.150.1

* Setting 'keepalive' for nginx

Research has indicated that this could help reduce '504 timeout'
errors and stress on the system when nginx is functioning as
a revers proxy.  Adding the server directives for keepalive
as noted here:

http://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive

* bump libmesos version

* remove stale files

* removing stale files

* bump blue ocean plugins

* updating jenkins lts release

* bump branch api plugin

* seperate plugins from dockerfile

* seperate plugins

* nit: newline

* Bump plugins to help with jenkins timeouts (#286)

* udate plugins and nginx

* bump plugin

* remove unused file

* Fix Jenkins on strict mode (#290)

* new LTS version of Jenkins (#292)

blueocean 1.14.0
nginx 1.10.3
various plugin updates

* new LTS version of Jenkins (#294)

* new LTS version of Jenkins (#295)
kaiwalyajoshi pushed a commit that referenced this pull request Oct 3, 2019
* Fixes from master applied to 3.5.x (#251)

* Update mesos plugin hash to include instrumentation

* Update default agent to 0.6.0 (#207)

* Update mesos plugin (#210)

* Update jackson plugin to latest

* Discover jenkins with autoip host name instead of host:port (#249)

Address [COPS-3395](https://jira.mesosphere.com/browse/COPS-3395)

* Always update the URL in mesos cloud config (#252)

* Always update the URL in mesos cloud config

The assigned port is dynamic and may change between runs.

* Always update Jenkins URL

* Update CHANGELOG for 3.5.1 (#253)

* Changed Jenkins URL to support Jenkins when deployed to a MoM. (#261)

* Fixing Mesos DNS name handling. (#273)

* [COPS-4290] Bump jenkins base version and plugins (#283)

* bump jenkins base tech 2.150.1

* Setting 'keepalive' for nginx

Research has indicated that this could help reduce '504 timeout'
errors and stress on the system when nginx is functioning as
a revers proxy.  Adding the server directives for keepalive
as noted here:

http://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive

* bump libmesos version

* remove stale files

* removing stale files

* bump blue ocean plugins

* updating jenkins lts release

* bump branch api plugin

* seperate plugins from dockerfile

* seperate plugins

* nit: newline

* Bump plugins to help with jenkins timeouts (#286)

* udate plugins and nginx

* bump plugin

* remove unused file

* Fix Jenkins on strict mode (#290)

* new LTS version of Jenkins (#292)

blueocean 1.14.0
nginx 1.10.3
various plugin updates

* new LTS version of Jenkins (#294)

* new LTS version of Jenkins (#295)

* Add gid, uid=99 for nobody user.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants