This is an automated email from the ASF dual-hosted git repository.
dmysakovets pushed a commit to branch odahu-integration
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
The following commit(s) were added to refs/heads/odahu-integration by this push:
new e64dc74 [odahu-integration] Changed odahu deploy image
e64dc74 is described below
commit e64dc7467c8d0b4394630a5135def3a78a697036
Author: Demyan Mysakovets <[email protected]>
AuthorDate: Tue Mar 17 18:13:09 2020 +0200
[odahu-integration] Changed odahu deploy image
---
.../src/general/conf/dlab.ini | 4 +--
.../src/general/files/gcp/odahu_Dockerfile | 2 +-
.../src/general/scripts/gcp/ssn_configure.py | 5 ++--
.../src/ssn/scripts/configure_docker.py | 29 +++++++++++-----------
4 files changed, 21 insertions(+), 19 deletions(-)
diff --git a/infrastructure-provisioning/src/general/conf/dlab.ini
b/infrastructure-provisioning/src/general/conf/dlab.ini
index 5b204d7..392bc48 100644
--- a/infrastructure-provisioning/src/general/conf/dlab.ini
+++ b/infrastructure-provisioning/src/general/conf/dlab.ini
@@ -362,8 +362,6 @@ jupyterlab_version = 1.1.0-rc8
###
packager_version = 1.1.0-rc10
###
-# node_locations =
-###
node_version = 1.13.12-gke.2
###
pods_cidr = 10.42.0.0/17
@@ -376,6 +374,8 @@ dns_project_id = or2-msq-epmc-dlab-t1iylu
###
infra_vpc_peering = 0
###
+deploy_image =
gcr.io/or2-msq-epmd-legn-t1iylu/odahu/odahu-flow-automation:1.1.0-rc8-dlab
+###
opa_policy =
cGFja2FnZSBvZGFodQoKIyByb2xlcy5yZWdvCgphZG1pbiA6PSAiYWRtaW4iCmRhdGFfc2NpZW50aXN0IDo9ICJkYXRhX3NjaWVudGlzdCIKCiMgcmJhYy5yZWdvCgpyYmFjIDo9IHsKCWRhdGFfc2NpZW50aXN0OiBbCiAgICAJWyIqIiwgImFwaS92MS9tb2RlbC9kZXBsb3ltZW50LioiXSwKICAgIAlbIioiLCAiYXBpL3YxL21vZGVsL3BhY2thZ2luZy4qIl0sCiAgICAJWyIqIiwgImFwaS92MS9tb2RlbC90cmFpbmluZy4qIl0sCiAgICAJWyJHRVQiLCAiYXBpL3YxL2Nvbm5lY3Rpb24uKiJdLAogICAgCVsiUE9TVCIsICJhcGkvdjEvY29ubmVjdGlvbi4qIl0sCiAgICAJWyJHRVQiLCAiYXBpL3YxL3BhY2thZ2luZy9pbnRlZ3JhdGl
[...]
###
# tls_crt =
diff --git a/infrastructure-provisioning/src/general/files/gcp/odahu_Dockerfile
b/infrastructure-provisioning/src/general/files/gcp/odahu_Dockerfile
index 1374163..995092d 100644
--- a/infrastructure-provisioning/src/general/files/gcp/odahu_Dockerfile
+++ b/infrastructure-provisioning/src/general/files/gcp/odahu_Dockerfile
@@ -19,7 +19,7 @@
#
#
******************************************************************************
-FROM <NEXUS_URL>/odahu-flow-automation:1.1.0
+FROM ODAHU_IMAGE
ARG OS
ARG SRC_PATH
diff --git
a/infrastructure-provisioning/src/general/scripts/gcp/ssn_configure.py
b/infrastructure-provisioning/src/general/scripts/gcp/ssn_configure.py
index cb0bdd6..1d932df 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/ssn_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/ssn_configure.py
@@ -247,10 +247,11 @@ if __name__ == "__main__":
{"name": "deeplearning", "tag": "latest"},
{"name": "dataengine", "tag": "latest"},
{"name": "dataengine-service", "tag": "latest"}]
- params = "--hostname {} --keyfile {} --additional_config '{}'
--os_family {} --os_user {} --dlab_path {} --cloud_provider {} --region {}
--gcr_creds {}". \
+ params = "--hostname {} --keyfile {} --additional_config '{}'
--os_family {} --os_user {} --dlab_path {}" \
+ " --cloud_provider {} --region {} --gcr_creds {}
--odahu_image". \
format(instance_hostname, ssn_conf['ssh_key_path'],
json.dumps(additional_config),
os.environ['conf_os_family'], ssn_conf['dlab_ssh_user'],
os.environ['ssn_dlab_path'],
- os.environ['conf_cloud_provider'], ssn_conf['region'],
os.environ['ssn_gcr_creds'])
+ os.environ['conf_cloud_provider'], ssn_conf['region'],
os.environ['ssn_gcr_creds'], os.environ['odahu_deploy_image'])
try:
local("~/scripts/{}.py {}".format('configure_docker', params))
diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
index 8825a43..af5d1c2 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
@@ -41,6 +41,7 @@ parser.add_argument('--cloud_provider', type=str, default='')
parser.add_argument('--resource', type=str, default='')
parser.add_argument('--region', type=str, default='')
parser.add_argument('--gcr_creds', type=str, default='')
+parser.add_argument('--odahu_image', type=str, default='')
args = parser.parse_args()
@@ -80,21 +81,21 @@ def add_china_repository(dlab_path):
sudo('sed -i "/pip install/s/jupyter/ipython==5.0.0 jupyter==1.0.0/g"
Dockerfile')
sudo('sed -i "22i COPY general/files/os/debian/sources.list
/etc/apt/sources.list" Dockerfile')
-def login_in_gcr(gcr_creds):
- try:
- with open('/tmp/dlab-gcr-ro-sa', 'w') as f:
- f.write(gcr_creds)
- local('scp -i {} /tmp/dlab-gcr-ro-sa
{}:/tmp/dlab-gcr-ro-sa'.format(args.keyfile, env.host_string))
- sudo('cat /tmp/dlab-gcr-ro-sa | base64 --decode >
/tmp/dlab-gcr-ro-sa.json')
- sudo('cat /tmp/dlab-gcr-ro-sa.json | docker login -u _json_key
--password-stdin https://gcr.io')
- print("Login in gcr has been completed")
- except Exception as err:
- traceback.print_exc()
- print('Failed to prepare odahu image: ', str(err))
- sys.exit(1)
+def login_in_gcr(gcr_creds, odahu_image, dlab_path):
+ if os.environ['conf_cloud_provider'] == 'gcp':
+ try:
+ with open('/tmp/dlab-gcr-ro-sa', 'w') as f:
+ f.write(gcr_creds)
+ local('scp -i {} /tmp/dlab-gcr-ro-sa
{}:/tmp/dlab-gcr-ro-sa'.format(args.keyfile, env.host_string))
+ sudo('cat /tmp/dlab-gcr-ro-sa | base64 --decode >
/tmp/dlab-gcr-ro-sa.json')
+ sudo('cat /tmp/dlab-gcr-ro-sa.json | docker login -u _json_key
--password-stdin https://gcr.io')
+ sudo('sed -i "s|ODAHU_IMAGE|{}|"
{}general/files/gcp/odahu_Dockerfile'.format(odahu_image, dlab_path))
+ except Exception as err:
+ traceback.print_exc()
+ print('Failed to prepare odahu image: ', str(err))
+ sys.exit(1)
def build_docker_images(image_list, region, dlab_path):
- print("Building docker images")
try:
if os.environ['conf_cloud_provider'] == 'azure':
local('scp -i {} /root/azure_auth.json
{}:{}sources/infrastructure-provisioning/src/base/'
@@ -192,7 +193,7 @@ if __name__ == "__main__":
sys.exit(1)
print("Login in Google Container Registry")
- login_in_gcr(args.gcr_creds)
+ login_in_gcr(args.gcr_creds, args.odahu_image, args.dlab_path)
print("Building dlab images")
count = 0
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]