Skip to content

Commit 838850c

Browse files
committed
Update and move to Travis CI
1 parent bcd3a74 commit 838850c

21 files changed

+181
-87
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
__pycache__
22
*.swp
33
*.pyc
4-
default_junit.xml
4+
molecule/*/junit.xml

.gitlab-ci.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.travis.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
language: python
3+
services: docker
4+
5+
env:
6+
global:
7+
- ROLE_NAME: htcondor-ce
8+
matrix:
9+
- MOLECULE_DISTRO: centos/systemd
10+
MOLECULE_DOCKER_COMMAND: /usr/sbin/init
11+
- MOLECULE_DISTRO: centos:6
12+
MOLECULE_DOCKER_COMMAND:
13+
14+
install:
15+
# FIXME molecule problem with 2.8 version
16+
- pip install "ansible==2.7.11"
17+
# Install test dependencies.
18+
- pip install molecule docker
19+
20+
before_script:
21+
# Use actual Ansible Galaxy role name for the project directory.
22+
- cd ../
23+
- mv ansible-role-$ROLE_NAME hephyvienna.$ROLE_NAME
24+
- cd hephyvienna.$ROLE_NAME
25+
26+
script:
27+
# Run tests.
28+
- molecule test
29+
30+
notifications:
31+
webhooks: https://galaxy.ansible.com/api/v1/notifications/

README.md

Lines changed: 101 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# grid_htc_ce
1+
# htcondor_ce
22

33
A brief description of the role goes here.
44

@@ -8,32 +8,121 @@ There is also the [OSG documentation](https://bbockelm.github.io/docs/compute-el
88

99
## Requirements
1010

11-
Any pre-requisites that may not be covered by Ansible itself or the role should
12-
be mentioned here. For instance, if the role uses the EC2 module, it may be a
13-
good idea to mention in this section that the boto package is required.
11+
* EL6/7
12+
* EPEL
13+
* UMD repos
1414

1515
## Role Variables
1616

17-
grid_htc_ce_repo_install: true
18-
grid_htc_ce_repo_development_enable: false
19-
grid_htc_ce_batch_system: slurm
20-
grid_htc_ce_argus_server:
17+
htcondor_ce_repo_install: true
2118

19+
Install HTCondor repository
20+
21+
htcondor_ce_repo_development_enable: false
22+
23+
Enable development repo for latest version
24+
25+
htcondor_ce_batch_system: slurm
26+
27+
Select batch system (only slurm tested)
28+
29+
htcondor_ce_enable_static_shadow: false
30+
31+
Did not test this feature.
32+
33+
htcondor_ce_enable_bdii: true
34+
35+
Enable BDDI of service
36+
37+
htcondor_ce_uid_domain: "{{ ansible_domain }}"
38+
39+
Recognise local condor daemons as friendly (not useful for batch systemn deployment)
40+
41+
htcondor_ce_condor_view_hosts: []
42+
43+
Condor View Hosts routes your collector information to global or site collectors
44+
45+
htcondor_ce_pool_collector_str: ''
46+
47+
Set appropriate place to route.
48+
49+
htcondor_ce_gsi_regexp: '^\/DC\=ch\/DC\=cern\/OU\=computers\/CN\=(host\/)?([A-Za-z0-9.\-]*)$'
50+
51+
52+
htcondor_ce_benchmark_result: 10.00-HEP-SPEC06
53+
54+
For BDII publishing
55+
56+
htcondor_ce_execution_env_cores: 16
57+
58+
For BDII publishing
59+
60+
htcondor_ce_election_hosts:
61+
- "{{ ansible_fqdn }}"
62+
63+
For BDII publishing
64+
65+
htcondor_ce_argus_server: argus.hephy.oeaw.ac.at
66+
67+
Argus server
68+
69+
htcondor_ce_argus_port: 8154
70+
71+
Argus server port
72+
73+
htcondor_ce_argus_resourceid: http://authz-interop.org/xacml/resource/resource-type/ce
74+
75+
Argus resource id
2276

2377
## Dependencies
2478

25-
A list of other roles hosted on Galaxy should go here, plus any details in
26-
regards to parameters that may need to be set for other roles, or variables that
27-
are used from other roles.
79+
- hephyvienna.grid
2880

2981
## Example Playbook
3082

3183
Including an example of how to use your role (for instance, with variables
3284
passed in as parameters) is always nice for users too:
3385

3486
- hosts: servers
87+
vars:
88+
poolaccounts:
89+
- name: 'cms%03d'
90+
uid: 10000
91+
number: 2
92+
step: 2
93+
description: 'Standard User of the CMS VO'
94+
group: cms
95+
gid: 10000
96+
- name: 'cmsprd%02d'
97+
uid: 11000
98+
number: 2
99+
step: 2
100+
description: 'Production User of the CMS VO'
101+
group: cmsprd
102+
gid: 11000
103+
groups: cms
104+
- name: 'cmspil%02d'
105+
uid: 12000
106+
number: 2
107+
step: 2
108+
description: 'Pilot User of the CMS VO'
109+
group: cmspil
110+
gid: 12000
111+
groups: cms
112+
- name: 'cmssgm'
113+
uid: 13000
114+
description: 'SW User of the CMS VO'
115+
group: cmssgm
116+
gid: 13000
117+
groups: cms
118+
grid_vos:
119+
- cms
35120
roles:
36-
- { role: hephyvienna.htcondor-ce, x: 42 }
121+
- role: geerlingguy.repo-epel
122+
- role: hephyvienna.poolaccounts
123+
- role: hephyvienna.grid
124+
- role: hephyvienna.htcondor-ce
125+
37126

38127
## License
39128

defaults/main.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
---
22
# defaults file for hephyvienna.htcondor-ce
3-
grid_htc_ce_repo_install: true
4-
grid_htc_ce_repo_development_enable: false
5-
grid_htc_ce_batch_system: slurm
6-
grid_htc_ce_enable_static_shadow: false
7-
grid_htc_ce_enable_bdii: true
8-
grid_htc_ce_uid_domain: "{{ ansible_domain }}"
9-
grid_htc_ce_condor_view_hosts: []
10-
grid_htc_ce_pool_collector_str: ''
11-
grid_htc_ce_gsi_regexp: '^\/DC\=ch\/DC\=cern\/OU\=computers\/CN\=(host\/)?([A-Za-z0-9.\-]*)$'
12-
grid_htc_ce_benchmark_result: 10.00-HEP-SPEC06
13-
grid_htc_ce_execution_env_cores: 16
14-
grid_htc_ce_election_hosts:
3+
htcondor_ce_repo_install: true
4+
htcondor_ce_repo_development_enable: false
5+
htcondor_ce_batch_system: slurm
6+
htcondor_ce_enable_static_shadow: false
7+
htcondor_ce_enable_bdii: true
8+
htcondor_ce_uid_domain: "{{ ansible_domain }}"
9+
htcondor_ce_condor_view_hosts: []
10+
htcondor_ce_pool_collector_str: ''
11+
htcondor_ce_gsi_regexp: '^\/DC\=ch\/DC\=cern\/OU\=computers\/CN\=(host\/)?([A-Za-z0-9.\-]*)$'
12+
htcondor_ce_benchmark_result: 10.00-HEP-SPEC06
13+
htcondor_ce_execution_env_cores: 16
14+
htcondor_ce_election_hosts:
1515
- "{{ ansible_fqdn }}"
16-
grid_htc_ce_argus_server: argus.heophy.oeaw.ac.at
17-
grid_htc_ce_argus_port: 8154
18-
grid_htc_ce_argus_resourceid: http://authz-interop.org/xacml/resource/resource-type/ce
16+
htcondor_ce_argus_server: argus.hephy.oeaw.ac.at
17+
htcondor_ce_argus_port: 8154
18+
htcondor_ce_argus_resourceid: http://authz-interop.org/xacml/resource/resource-type/ce

handlers/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
22
# handlers file for hephyvienna.htcondor-ce
3-
- name: reconfigure condor_ce
3+
- name: reconfigure htcondor_ce
44
command: /usr/bin/condor_ce_reconfig
55
when: not service_bdii.changed | default(true) or not service_condor_ce

meta/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
galaxy_info:
3-
role_name: grid_htc_ce
3+
role_name: htcondor_ce
44
author: Dietrich Liko
55
description: HTCondor CE
6-
company: Institute for High energy Physics, Austrian Academy of Sciences
7-
issue_tracker_url: https://gitlab.cern.ch/hephyvienna/ansible/role-grid-htc-ce/issues
6+
company: Institute for High Energy Physics, Austrian Academy of Sciences
7+
issue_tracker_url: https://gitlab.cern.ch/hephyvienna/ansible/role-htcondor-ce/issues
88
license: MIT
99
min_ansible_version: 2.7
1010
platforms:

molecule/default/files/dummy.crt

Lines changed: 0 additions & 1 deletion
This file was deleted.

molecule/default/files/dummy.key

Lines changed: 0 additions & 1 deletion
This file was deleted.

molecule/default/molecule.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ lint:
1010
name: yamllint
1111
platforms:
1212
- name: instance
13-
image: centos/systemd
13+
image: ${MOLECULE_IMAGE:-'centos/systemd'}
1414
capabilities:
1515
- SYS_ADMIN
1616
tmpfs:
1717
- /tmp
1818
- /run
1919
volume_mounts:
2020
- /sys/fs/cgroup:/sys/fs/cgroup:ro
21-
command: /usr/sbin/init
21+
command: ${MOLECULE_DOCKER_COMMAND:-'/usr/sbin/init'}
2222
provisioner:
2323
name: ansible
2424
lint:
@@ -28,6 +28,6 @@ verifier:
2828
options:
2929
# FIXME
3030
W: ignore::DeprecationWarning
31-
junit-xml: ../../default_junit.xml
31+
junit-xml: junit.xml
3232
lint:
3333
name: flake8

molecule/default/playbook.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,12 @@
3232
group: cmssgm
3333
gid: 13000
3434
groups: cms
35-
grid_site_name: Hephy-Vienna
35+
grid_enable_dummy_ca: true
36+
grid_enable_dummy_hostcert: true
3637
grid_vos:
3738
- cms
38-
grid_host_certificate:
39-
cert: files/dummy.crt
40-
key: files/dummy.key
4139
roles:
4240
- role: geerlingguy.repo-epel
43-
- role: dietrichliko.poolaccounts
44-
- role: dietrichliko.grid
45-
- role: hephyvienna.grid-htc-ce
41+
- role: hephyvienna.poolaccounts
42+
- role: hephyvienna.grid
43+
- role: hephyvienna.htcondor-ce

molecule/default/requirements.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
22
- src: geerlingguy.repo-epel
3-
- src: dietrichliko.grid
4-
- src: dietrichliko.poolaccounts
3+
- src: hephyvienna.grid
4+
- src: hephyvienna.poolaccounts

tasks/bdii.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
template:
88
src: ce-bdii.conf.j2
99
dest: /etc/condor-ce/config.d/06-ce-bdii.conf
10-
notify: reconfigure condor_ce
10+
notify: reconfigure htcondor_ce
1111

1212
- name: Start BDII
1313
service:

tasks/htcondor-ce.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
- htcondor-ce-client
66
- htcondor-ce-view
77
- htcondor-ce
8-
- "htcondor-ce-{{ grid_htc_ce_batch_system }}"
8+
- "htcondor-ce-{{ htcondor_ce_batch_system }}"
99

1010
- name: Copy certificates
1111
copy:
@@ -33,16 +33,16 @@
3333
dest: config.d/61-job-routes.conf
3434
- src: condor_mapfile.j2
3535
dest: condor_mapfile
36-
notify: reconfigure condor_ce
36+
notify: reconfigure htcondor_ce
3737

38-
- name: Configure condor sysconfig
38+
- name: Configure HTCondor CE sysconfig
3939
template:
4040
src: condor-ce.sysconfig.j2
4141
dest: /etc/sysconfig/condor-ce
4242

4343
- name: Enable static shadow
4444
include_tasks: static-shadow.yml
45-
when: grid_htc_ce_enable_static_shadow
45+
when: htcondor_ce_enable_static_shadow
4646

4747
- name: Enable argus authorisation
4848
include_tasks: auth-argus.yml

tasks/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
# tasks file for hephyvienna.htcondor-ce
33
- name: Install repositories
44
include_tasks: repos.yml
5-
when: grid_htc_ce_repo_install
5+
when: htcondor_ce_repo_install
66

77
- name: Install HTCondor CE
88
include_tasks: htcondor-ce.yml
99

1010
- name: Install BDII
1111
include_tasks: bdii.yml
12-
when: grid_htc_ce_enable_bdii
12+
when: htcondor_ce_enable_bdii

tasks/repos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
- name: htcondor-development
1616
description: "HTCondor Development RPM Repository for Redhat Enterprise Linux {{ ansible_distribution_major_version }}"
1717
baseurl: "https://research.cs.wisc.edu/htcondor/yum/development/rhel{{ ansible_distribution_major_version }}"
18-
enabled: "{{ grid_htc_ce_repo_development_enable }}"
18+
enabled: "{{ htcondor_ce_repo_development_enable }}"
1919
loop_control:
2020
label: "{{ item.name }}"

templates/ce-bdii.conf.j2

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66
##############################################################################
77

88
# For multi-CE sites, only one CE publishes certain values.
9-
{% if grid_htc_ce_election_hosts | length > 1 %}
9+
{% if htcondor_ce_election_hosts | length > 1 %}
1010
HTCONDORCE_BDII_ELECTION = ZOOKEEPER
11-
HTCONDORCE_BDII_ZKHOSTS = {{ grid_htc_ce_election_hosts | sort | join(',') }}
11+
HTCONDORCE_BDII_ZKHOSTS = {{ htcondor_ce_election_hosts | sort | join(',') }}
1212
{% else %}
1313
HTCONDORCE_BDII_ELECTION = LEADER
14-
HTCONDORCE_BDII_LEADER = {{ grid_htc_ce_election_hosts[0] }}
14+
HTCONDORCE_BDII_LEADER = {{ htcondor_ce_election_hosts[0] }}
1515
{% endif %}
1616

1717
# BDII Static Info and VOs
1818
HTCONDORCE_VONames = {{ grid_vos | sort | join(', ') }}
1919
HTCONDORCE_SiteName = {{ grid_site_name }}
20-
HTCONDORCE_HEPSPEC_INFO = {{ grid_htc_ce_benchmark_result }}
21-
HTCONDORCE_CORES = {{ grid_htc_ce_execution_env_cores }} # cores per node
20+
HTCONDORCE_HEPSPEC_INFO = {{ htcondor_ce_benchmark_result }}
21+
HTCONDORCE_CORES = {{ htcondor_ce_execution_env_cores }} # cores per node

0 commit comments

Comments
 (0)