Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Commit 06188c1

Browse files
committed
Tag for 2.8.0rc2 release
- Fix regression with private docker image pulls - Resolves #103 - Resolves #105
1 parent afde52a commit 06188c1

13 files changed

+79
-31
lines changed

CHANGELOG.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,20 @@
22

33
## [Unreleased]
44

5+
## [2.8.0rc2] - 2017-06-30
56
### Added
67
- Support Mac OS X and Windows Subsystem for Linux installations via
7-
`install.sh`
8+
`install.sh` (#101)
89
- Guide for Windows Subsystem for Linux installations
10+
- Automated Nvidia driver install for NV-series
911

1012
### Changed
1113
- Drop unsupported designations for Mac OS X and Windows
14+
- Update Docker engine to 17.06 for Ubuntu, Debian, CentOS and 17.04 for
15+
OpenSUSE
16+
17+
### Fixed
18+
- Regression in private registry image pulls
1219

1320
## [2.8.0rc1] - 2017-06-27
1421
### Added
@@ -710,7 +717,8 @@ transfer is disabled
710717
#### Added
711718
- Initial release
712719

713-
[Unreleased]: https://github.com/Azure/batch-shipyard/compare/2.8.0rc1...HEAD
720+
[Unreleased]: https://github.com/Azure/batch-shipyard/compare/2.8.0rc2...HEAD
721+
[2.8.0rc2]: https://github.com/Azure/batch-shipyard/compare/2.8.0rc1...2.8.0rc2
714722
[2.8.0rc1]: https://github.com/Azure/batch-shipyard/compare/2.8.0b1...2.8.0rc1
715723
[2.8.0b1]: https://github.com/Azure/batch-shipyard/compare/2.7.0...2.8.0b1
716724
[2.7.0]: https://github.com/Azure/batch-shipyard/compare/2.7.0rc1...2.7.0

cascade/cascade.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ def _pull(self, image: str) -> tuple:
429429
if proc.returncode == 0 and not _pub:
430430
# tag image to remove registry ip
431431
subprocess.check_call(
432-
'docker tag {} {}'.format(_REGISTRY, src, image),
432+
'docker tag {} {}'.format(src, image),
433433
shell=True)
434434
return proc.returncode, stdout, stderr
435435

convoy/batch.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1925,15 +1925,25 @@ def generate_docker_login_settings(config, for_ssh=False):
19251925
'-p $DOCKER_LOGIN_PASSWORD')
19261926
# transform env and cmd into single command for ssh
19271927
if for_ssh and len(cmd) > 0:
1928+
srv = None
1929+
for ev in env:
1930+
if ev.name == 'DOCKER_LOGIN_PASSWORD':
1931+
pw = ev.value
1932+
elif ev.name == 'DOCKER_LOGIN_USERNAME':
1933+
user = ev.value
1934+
elif ev.name == 'DOCKER_LOGIN_SERVER':
1935+
srv = ev.value
19281936
key = '${}'.format('DOCKER_LOGIN_PASSWORD')
19291937
if encrypt:
1930-
pw = cmd[0][22:].replace(key, env[1].value)
1938+
pw = cmd[0][22:].replace(key, pw)
19311939
cmd = cmd[1].replace(key, pw)
19321940
else:
1933-
pw = env[1].value
19341941
cmd = cmd[0].replace(key, pw)
19351942
key = '${}'.format('DOCKER_LOGIN_USERNAME')
1936-
cmd = cmd.replace(key, env[0].value)
1943+
cmd = cmd.replace(key, user)
1944+
if util.is_not_empty(srv):
1945+
key = '${}'.format('DOCKER_LOGIN_SERVER')
1946+
cmd = cmd.replace(key, srv)
19371947
if encrypt:
19381948
key = 'openssl'
19391949
if key in cmd:

convoy/fleet.py

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,19 @@
9494
'sha256': (
9595
'59e37f570ba5f3d7148028e96684d77f347d49a54e3722189782fc9b17d201c0'
9696
),
97+
'target': 'resources/nvidia-driver.run'
98+
},
99+
'visualization': {
100+
'url': 'https://go.microsoft.com/fwlink/?linkid=849941',
101+
'sha256': (
102+
'f5e39c9abf6d48d9883cd61d8fec8c67f05c9d6a7cc8b450af0efa790fbbd1a7'
103+
),
104+
'target': 'resources/nvidia-driver-grid.run'
97105
},
98106
'license': (
99107
'http://www.nvidia.com/content/DriverDownload-March2009'
100108
'/licence.php?lang=us'
101109
),
102-
'target': 'resources/nvidia-driver.run'
103110
}
104111
_NODEPREP_FILE = (
105112
'shipyard_nodeprep.sh',
@@ -289,14 +296,8 @@ def _setup_nvidia_driver_package(blob_client, config, vm_size):
289296
:rtype: pathlib.Path
290297
:return: package path
291298
"""
292-
if settings.is_gpu_compute_pool(vm_size):
293-
gpu_type = 'compute'
294-
elif settings.is_gpu_visualization_pool(vm_size):
295-
gpu_type = 'visualization'
296-
raise RuntimeError(
297-
('pool consisting of {} nodes require gpu driver '
298-
'configuration').format(vm_size))
299-
pkg = pathlib.Path(_ROOT_PATH, _NVIDIA_DRIVER['target'])
299+
gpu_type = settings.get_gpu_type_from_vm_size(vm_size)
300+
pkg = pathlib.Path(_ROOT_PATH, _NVIDIA_DRIVER[gpu_type]['target'])
300301
# check to see if package is downloaded
301302
if (not pkg.exists() or
302303
util.compute_sha256_for_file(pkg, False) !=
@@ -314,14 +315,14 @@ def _setup_nvidia_driver_package(blob_client, config, vm_size):
314315
logger.info('NVIDIA Software License accepted')
315316
# download driver
316317
logger.debug('downloading NVIDIA driver to {}'.format(
317-
_NVIDIA_DRIVER['target']))
318+
_NVIDIA_DRIVER[gpu_type]['target']))
318319
response = requests.get(_NVIDIA_DRIVER[gpu_type]['url'], stream=True)
319320
with pkg.open('wb') as f:
320321
for chunk in response.iter_content(chunk_size=_REQUEST_CHUNK_SIZE):
321322
if chunk:
322323
f.write(chunk)
323324
logger.debug('wrote {} bytes to {}'.format(
324-
pkg.stat().st_size, _NVIDIA_DRIVER['target']))
325+
pkg.stat().st_size, _NVIDIA_DRIVER[gpu_type]['target']))
325326
# check sha256
326327
if (util.compute_sha256_for_file(pkg, False) !=
327328
_NVIDIA_DRIVER[gpu_type]['sha256']):
@@ -833,7 +834,9 @@ def _add_pool(
833834
blob_client, config, pool_settings.vm_size)
834835
_rflist.append((gpu_driver.name, gpu_driver))
835836
else:
836-
gpu_driver = pathlib.Path(_NVIDIA_DRIVER['target'])
837+
gpu_type = settings.get_gpu_type_from_vm_size(
838+
pool_settings.vm_size)
839+
gpu_driver = pathlib.Path(_NVIDIA_DRIVER[gpu_type]['target'])
837840
gpupkg = _setup_nvidia_docker_package(blob_client, config)
838841
_rflist.append((gpupkg.name, gpupkg))
839842
gpu_env = '{}:{}:{}'.format(

convoy/settings.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,21 @@ def is_gpu_visualization_pool(vm_size):
388388
return False
389389

390390

391+
def get_gpu_type_from_vm_size(vm_size):
392+
# type: (str) -> str
393+
"""Get GPU type as string
394+
:param str vm_size: vm size
395+
:rtype: str
396+
:return: compute for gpgpu and visualization for viz
397+
"""
398+
if is_gpu_compute_pool(vm_size):
399+
return 'compute'
400+
elif is_gpu_visualization_pool(vm_size):
401+
return 'visualization'
402+
else:
403+
return None
404+
405+
391406
def is_rdma_pool(vm_size):
392407
# type: (str) -> bool
393408
"""Check if pool is IB/RDMA capable

convoy/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@
2222
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
2323
# DEALINGS IN THE SOFTWARE.
2424

25-
__version__ = '2.8.0rc1'
25+
__version__ = '2.8.0rc2'

docs/11-batch-shipyard-configuration-credentials.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,6 @@ or private repositories on Docker Hub.
215215
Azure KeyVault.
216216

217217
## Full template
218-
An full template of a credentials file can be found
218+
A full template of a credentials file can be found
219219
[here](../config\_templates/credentials.json). Note that this template cannot
220220
be used as-is and must be modified to fit your scenario.

docs/12-batch-shipyard-configuration-global.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,6 @@ one or all of `data_volumes` and `shared_data_volumes` if you do not require
449449
this functionality.
450450

451451
## Full template
452-
An full template of a credentials file can be found
452+
A full template of a credentials file can be found
453453
[here](../config\_templates/config.json). Note that this template cannot
454454
be used as-is and must be modified to fit your scenario.

docs/13-batch-shipyard-configuration-pool.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,15 +255,16 @@ on how to generate an SSH keypair for use with Batch Shipyard.
255255
[HPN patches](https://www.psc.edu/index.php/using-joomla/extensions/templates/atomic/636-hpn-ssh)
256256
to be swapped with the standard distribution OpenSSH server. This is not
257257
supported on all Linux distributions and may be force disabled.
258-
* (required for `STANDARD_NV` instances, optional for `STANDARD_NC` instances)
259-
`gpu` property defines additional information for NVIDIA GPU-enabled VMs:
258+
* (optional) `gpu` property defines additional information for NVIDIA
259+
GPU-enabled VMs. If not specified, Batch Shipyard will automatically download
260+
the driver for the `vm_size` specified.
260261
* `nvidia_driver` property contains the following required members:
261262
* `source` is the source url to download the driver.
262263
* (optional) `additional_node_prep_commands` is an array of additional commands
263264
to execute on the compute node host as part of node preparation. This can
264265
be empty or omitted.
265266

266267
## Full template
267-
An full template of a credentials file can be found
268+
A full template of a credentials file can be found
268269
[here](../config\_templates/pool.json). Note that this template cannot
269270
be used as-is and must be modified to fit your scenario.

docs/14-batch-shipyard-configuration-jobs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,6 @@ transferred again. This object currently supports `azure_batch` and
465465
This property may be null.
466466

467467
## Full template
468-
An full template of a credentials file can be found
468+
A full template of a credentials file can be found
469469
[here](../config\_templates/jobs.json). Note that this template cannot
470470
be used as-is and must be modified to fit your scenario.

0 commit comments

Comments
 (0)