sassoftware / sas-container-recipes

A collection of recipes and other resources for building containers that include SAS Viya software.
https://www.sas.com
Apache License 2.0
89 stars 42 forks source link

[ERROR] : Could not create base image (n_docker_build_rc=2) #13

Closed kchaksuvej closed 5 years ago

kchaksuvej commented 5 years ago

Got error "[ERROR] : Could not create base image" when try to create sas viya docker single container

This is command I used :

./build.sh --zip ~/viya/SAS_Viya_deployment_data.zip addons/auth-demo addons/ide-jupyter-python3

I used most current docker:

/home/kchaksuvej/sas-container-recipes [kchaksuvej@ermas-erm logs]$ docker version Client: Version: 18.09.4 API version: 1.39 Go version: go1.10.8 Git commit: d14af54266 Built: Wed Mar 27 18:34:51 2019 OS/Arch: linux/amd64 Experimental: false

Server: Docker Engine - Community Engine: Version: 18.09.4 API version: 1.39 (minimum version 1.12) Go version: go1.10.8 Git commit: d14af54 Built: Wed Mar 27 18:04:46 2019 OS/Arch: linux/amd64 Experimental: false

This is error:

PLAY RECAP ***** deployTarget : ok=50 changed=6 unreachable=0 failed=1
localhost : ok=10 changed=0 unreachable=0 failed=0

The command '/bin/sh -c set -e; pushd sas_viya_playbook ; echo; echo "####### Run the playbook"; echo; ansible-playbook -i inventory_local.ini site.yml -e '@vars_usermods.yml' -vvv ; echo; echo "####### Stop the running services"; echo; /etc/init.d/sas-viya-all-services stop; popd; echo; echo "####### Reset host variables to localhost"; echo; sed -i 's|^options cashost="." casport|options cashost="localhost" casport|' /opt/sas/viya/config/etc/batchserver/default/autoexec_deployment.sas; sed -i 's|^env.CAS_VIRTUAL_HOST = '.'|env.CAS_VIRTUAL_HOST = 'localhost'|' /opt/sas/viya/config/etc/cas/default/casconfig_deployment.lua; sed -i 's|^SASCONTROLLERHOST=.|SASCONTROLLERHOST=localhost|' /opt/sas/viya/config/etc/sysconfig/cas/default/sas-cas-deployment; sed -i 's|^SAS_CURRENT_HOST=.|SAS_CURRENT_HOST=localhost|' /opt/sas/viya/config/etc/sysconfig/cas/default/sas-cas-deployment; sed -i 's|^options cashost="." casport|options cashost="localhost" casport|' /opt/sas/viya/config/etc/workspaceserver/default/autoexec_deployment.sas; if [ "$PLATFORM" = "redhat" ] ; then sed -i 's|http://.:|http://localhost:|' /etc/httpd/conf.d/proxy.conf; echo "ServerName localhost" >> /etc/httpd/conf/httpd.conf; elif [ "$PLATFORM" = "suse" ]; then sed -i 's|http://.*:|http://localhost:|' /etc/apache2/conf.d/proxy.conf; echo "ServerName localhost" >> /etc/apache2/httpd.conf; fi; echo; echo "####### Remove permstore"; echo; rm --verbose --recursive --force /opt/sas/viya/config/etc/cas/default/permstore/; echo; echo "####### Remove created logs"; echo; rm --verbose --recursive --force /opt/sas/viya/config/var/log/all-services/default/; rm --verbose --recursive --force /opt/sas/viya/config/var/log/cas/default/; rm --verbose --recursive --force /opt/sas/viya/config/var/log/sasstudio/default/; rm --verbose --recursive --force /opt/sas/viya/config/var/log/spawner/default/; echo; if [ "$PLATFORM" = "redhat" ] || [ "$PLATFORM" = "suse" ]; then echo; echo "####### Remove Text Analytic languages; we will add them back in their own layer"; echo; for txtmin in $(rpm -qa | grep sas-txtmin); do if [[ "${txtmin}" != "sas-txtmineng" ]] && [[ "${txtmin}" != "yum" ]]; then echo "####### Uninstalling ${txtmin}"; rpm --verbose -e ${txtmin}; fi; done; fi; if [ "$PLATFORM" = "redhat" ] ; then echo; echo "####### Remove some of the bigger packages that have bloated the layer"; echo; for bigpackage in "sas-mapsgfka1" "sas-mapsgfkb1" "sas-nvidiacuda1" "sas-nvidiacuda" "sas-mapsvahdat" "sas-reportvahdat"; do if rpm -q --quiet ${bigpackage}; then yum erase --assumeyes ${bigpackage}; fi; done; echo; echo "####### Remove the repos"; echo; yum erase --assumeyes "sas-meta-repo"; if [ -e "/etc/yum.repos.d/sas.repo" ]; then rm --verbose /etc/yum.repos.d/sas.repo; fi; echo; echo "####### Clean up yum"; echo; yum clean all; rm --verbose --recursive --force /root/.cache /var/cache/yum; elif [ "$PLATFORM" = "suse" ]; then echo; echo "####### Remove some of the bigger packages that have bloated the layer"; echo; for bigpackage in "sas-mapsgfka1" "sas-mapsgfkb1" "sas-nvidiacuda1" "sas-nvidiacuda" "sas-mapsvahdat" "sas-reportvahdat"; do if rpm -q --quiet ${bigpackage}; then zypper remove -y ${bigpackage}; fi; done; mkdir -p /opt/sas/viya/config/var/log/spawner/default ; chown sas:sas /opt/sas/viya/config/var/log/spawner/default; echo; echo "####### Clean up zypper"; echo; zypper clean --all; rm --verbose --recursive --force /etc/zypp/repos.d/sas-reposuse*.repo; rm --verbose --recursive --force /var/cache/zypp; fi; echo; echo "####### Remove the entitlement certificate"; echo; rm --verbose --recursive --force /etc/pki/sas; echo; echo "####### Remove the content in the WORKDIR"; echo; rm --verbose --recursive --force sas-orchestration sas-orchestration-linux.tgz;' returned a non-zero code: 2

[ERROR] : Could not create base image

Any suggestions.

Thanks

g8sman commented 5 years ago

Hi, can you provide the log just before

PLAY RECAP *********************************************************************
deployTarget : ok=50 changed=6 unreachable=0 failed=1
localhost : ok=10 changed=0 unreachable=0 failed=0

Looks like the playbook had an error in it which the log should help identify.

Cheers!

kchaksuvej commented 5 years ago

This is the log file.

On Sun, Mar 31, 2019 at 11:56 AM g8sman notifications@github.com wrote:

Hi, can you provide the log just before

PLAY RECAP ***** deployTarget : ok=50 changed=6 unreachable=0 failed=1 localhost : ok=10 changed=0 unreachable=0 failed=0

Looks like the playbook had an error in it which the log should help identify.

Cheers!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sassoftware/sas-container-recipes/issues/13#issuecomment-478353936, or mute the thread https://github.com/notifications/unsubscribe-auth/AY6D_0dURRqayn3UXWhfi_7cMlAmukwaks5vcNrHgaJpZM4cUVi6 .

g8sman commented 5 years ago

The step that broke down is the ~13th step in the viya-programming/viya-single-container/Dockerfile. There should have been output from those steps at a minimum. In this particular step, the playbook that was generated failed during the execution. That is why we are seeing the PLAY RECAP section with a failure.

There should be a build log in /home/kchaksuvej/sas-container-recipes/log called build_sas_container.log. Can you attach that file?

kchaksuvej commented 5 years ago

Any suggestions to fix it.

Thanks

On Sun, Mar 31, 2019 at 12:45 PM Kit Chaksuvej kchaksuvej@gmail.com wrote:

On Sun, Mar 31, 2019 at 12:39 PM g8sman notifications@github.com wrote:

The step that broke down is the ~13th step in the viya-programming/viya-single-container/Dockerfile. There should have been output from those steps at a minimum. In this particular step, the playbook that was generated failed during the execution. That is why we are seeing the PLAY RECAP section with a failure.

There should be a build log in /home/kchaksuvej/sas-container-recipes/log called build_sas_container.log. Can you attach that file?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sassoftware/sas-container-recipes/issues/13#issuecomment-478357370, or mute the thread https://github.com/notifications/unsubscribe-auth/AY6D_-9ABtrFkqEochITk6C5xln0Aymeks5vcOTDgaJpZM4cUVi6 .

g8sman commented 5 years ago

Did you attach the log file? I didn't see that it was attached to your comment.

kchaksuvej commented 5 years ago

build_sas_container.log

kchaksuvej commented 5 years ago

Just did it

g8sman commented 5 years ago

Thank you! The error was an issue when trying to install the repository definition.

"msg": "https://ses.sas.download/ses/repos/meta-repo/Packages/s/sas-decsnmgr-100-x64_redhat_linux_6-yum-1-1.noarch.rpm: [Errno -1] Package does not match intended download. Suggestion: run yum --enablerepo=sas-meta-repo clean metadata\nTrying other mirror.\n\n\nError downloading packages:\n  sas-decsnmgr-100-x64_redhat_linux_6-yum-1-1.noarch: [Errno 256] No more mirrors to try.\n\n", 

Are you consistently seeing this error?

kchaksuvej commented 5 years ago

Yes.

Do not know how to fix it.

On Mon, Apr 1, 2019 at 11:31 AM g8sman notifications@github.com wrote:

Thank you! The error was an issue when trying to install the repository definition.

"msg": "https://ses.sas.download/ses/repos/meta-repo/Packages/s/sas-decsnmgr-100-x64_redhat_linux_6-yum-1-1.noarch.rpm: [Errno -1] Package does not match intended download. Suggestion: run yum --enablerepo=sas-meta-repo clean metadata\nTrying other mirror.\n\n\nError downloading packages:\n sas-decsnmgr-100-x64_redhat_linux_6-yum-1-1.noarch: [Errno 256] No more mirrors to try.\n\n",

Are you consistently seeing this error?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sassoftware/sas-container-recipes/issues/13#issuecomment-478628180, or mute the thread https://github.com/notifications/unsubscribe-auth/AY6D_6tsQW4Wq6vy5TgQPN-WH4rKzuEaks5vciZXgaJpZM4cUVi6 .

hornpolish commented 5 years ago

maybe you are running out of disk-space on the volume that holds /var/lib/docker (or whereever you repointed that). docker doesnt give great error messages when the image being created over-extends the free space available in docker/images. [just a guess]

erwangranger commented 5 years ago

One more suggestion for you to consider:

Since the URL starts with https://ses.sas.download/, it seems that you are accessing SAS's YUM repos directly.

It is highly recommended to create a local mirror of the YUM repo and use that when building your container images. (Read this).

I can't guarantee that it will fix your particular problem, but it might make the symptoms clearer. If you go down this route, remember that you need to 1) create the mirror, then 2) serve it over http, and 3) pass an override to the build process to tell it to use the mirror rather than the SAS Repos. I strongly believe this is worth doing anyways, even if it does not immediately solve your issue. (if you don't, you are likely to run into other issues quickly).

I hope this helps.

kchaksuvej commented 5 years ago

Will try. Thanks

kchaksuvej commented 5 years ago

Just create the mirror but how can I server it over http?

Mirror is on local folder.

Thanks

g8sman commented 5 years ago

Easiest way would be to use SimpleHTTPServer. Navigate to the root of the mirror and run

nohup python -m SimpleHTTPServer 8321 &

You should then be able to navigate to http://host:8321 in your browser and see the repo contents. Remember to replace "host" with the name of your host. The root of your mirror should contain


$ ls -1 /home/g8sman/mirror
entitlements.json
location_group_declarations.json
nohup.out
repos
sasmd
kchaksuvej commented 5 years ago

After use local mirror repo, it has new error:

Could not find or access '/tmp/sas/sas_viya_playbook/roles/framework/defaults/certificateAuthority-generateTokenForSecretsAndCertificates.yml

TASK [espbase-x64_redhat_linux_6-yum : include] **** task path: /tmp/sas/sas_viya_playbook/roles/espbase-x64_redhat_linux_6-yum/tasks/configure.yml:2 Read vars_file '../vars.yml' included: /tmp/sas/sas_viya_playbook/roles/framework/tasks/main.yml for deployTarget Read vars_file '../vars.yml' Read vars_file '../vars.yml' Read vars_file '../vars.yml' Read vars_file '../vars.yml' Read vars_file '../vars.yml'

TASK [espbase-x64_redhat_linux_6-yum : include variables for framework action, "certificateAuthority-generateTokenForSecretsAndCertificates"] *** task path: /tmp/sas/sas_viya_playbook/roles/framework/tasks/main.yml:1 fatal: [deployTarget]: FAILED! => { "ansible_facts": {}, "ansible_included_var_files": [], "changed": false, "failed": true, "message": "Could not find or access '/tmp/sas/sas_viya_playbook/roles/framework/defaults/certificateAuthority-generateTokenForSecretsAndCertificates.yml'" }

Any suggestions

Thanks build_sas_container.log

g8sman commented 5 years ago

What version of SAS Viya Software do you have? Viya 3.4?

kchaksuvej commented 5 years ago

I think it is 3.4

kchaksuvej commented 5 years ago

Do I need CA certificate Authority or any certificate to build single sas viya image ? Thanks

g8sman commented 5 years ago

It is included in the SAS_Viya_deployment_data.zip. Asking some internal folks at SAS to see if we have seen this before.

kchaksuvej commented 5 years ago

Opened SAS ticket but no answer yet. Thanks

g8sman commented 5 years ago

What is your TS number?

kchaksuvej commented 5 years ago

SAS 7612737352

g8sman commented 5 years ago

Your order contains SAS Event Stream Processing 5.1 which is not supported in a programming only deployment, which is what the single-container image is. Here is the support note for that references this situation, http://support.sas.com/kb/63/793.html. The wiki introduction page tries to provide some of that information. Looks like we need to add a not here that if ESP is in the order the programming only recipes will not work.

The recipes are targeted for SAS Viya 3.4 based orders so while your order is SAS Viya 3.3 based, you could try to run the "full" deployment type and see if that gets you any farther. SAS Event Stream Processing 6.1 coming out a little later this year will have support for the programming-only path.

For now will keep this issue open so we can document that the SAS ESP 5.1 will not work in the programming only case.

Cheers!

kchaksuvej commented 5 years ago

Can I bypass "SAS Event Stream Processing 5.1 " when I install programming only deployment ? If not, I will try to do full install. Thanks

g8sman commented 5 years ago

@kchaksuvej, You cannot by pass the ESP portion when doing the programming only deployment.

kchaksuvej commented 5 years ago

I got new sas viya depot. I installed using this command and it successfully created sas viya image.

./build.sh --type single --zip SAS_Viya_deployment_data.zip --mirror-url http://172.21.0.1:8321 addons/auth-demo addons/ide-jupyter-python3

I used this command to start container.

docker run --detach --rm \ --env CASENV_CAS_VIRTUAL_HOST=35.229.85.100 \ --env CASENV_CAS_VIRTUAL_PORT=8081 \ --publish-all \ --publish 8081:80 \ --name sas-viya-programming --hostname 35.229.85.100 sas-viya-programming:19.03.0-20190502200008-2e3bf7c

I can logon to SASStudio and cas-shared-default-http.

http://35.229.85.100:8081/SASStudio http://35.229.85.100:8081/cas-shared-default-http/

But when I try to access Jupyter (http://35.229.85.100:8081/Jupyter ), I got error

Proxy Error The proxy server received an invalid response from an upstream server. The proxy server could not handle the request GET /Jupyter. Reason: DNS lookup failure for: sas-viya-programming

I run docker images and I see these.

REPOSITORY TAG IMAGE ID CREATED SIZE sas-viya-programming 19.03.0-20190502200008-2e3bf7c 8947d27ba15f 2 hours ago 14.2GB svc-ide-jupyter-python3-http latest 8947d27ba15f 2 hours ago 14.2GB svc-ide-jupyter-python3 latest 03d2ca51d743 2 hours ago 14.2GB svc-auth-demo latest 43f2fdbdc956 2 hours ago 13.5GB viya-single-container latest 45963bb7f330 2 hours ago 13.5GB

Can I used this Jupyter container in single user ? If yes , how to start jupyter?

Thanks

g8sman commented 5 years ago

Good news on being able to do the build and run. For Jupyter, can you exec into the image and double check that the /etc/httpd/conf.d/jpy3_proxy.conf file exists and that it looks correct?

kchaksuvej commented 5 years ago

This is content in jpy3_proxy.conf. Do I have to modify it?

Thanks

[root@35 conf.d]# cat jpy3_proxy.conf #

Copyright 2018 SAS Institute Inc.

#

Licensed under the Apache License, Version 2.0 (the "License");

you may not use this file except in compliance with the License.

You may obtain a copy of the License at

#

https://www.apache.org/licenses/LICENSE-2.0

#

Unless required by applicable law or agreed to in writing, software

distributed under the License is distributed on an "AS IS" BASIS,

WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the License for the specific language governing permissions and

limitations under the License.

#

<Location /Jupyter> ProxyPass http://sas-viya-programming:8888/Jupyter ProxyPassReverse http://sas-viya-programming:8888/Jupyter RequestHeader set Origin "http://sas-viya-programming:8888"

<Location /Jupyter/api/kernels> ProxyPass ws://sas-viya-programming:8888/Jupyter/api/kernels ProxyPassReverse ws://sas-viya-programming:8888/Jupyter/api/kernels

<Location /Jupyter/terminals/> ProxyPass ws://sas-viya-programming:8888/Jupyter/terminals ProxyPassReverse ws://sas-viya-programming:8888/Jupyter/terminals

kchaksuvej commented 5 years ago

Do I have to change sas-viya-programming to ip address?

g8sman commented 5 years ago

Nope. This would indicate to me that we have a bug. When we build the image we want the conf file to look like:

<Location /Jupyter>
ProxyPass http://localhost:8888/Jupyter
ProxyPassReverse http://localhost:8888/Jupyter
RequestHeader set Origin "http://localhost:8888"

<Location /Jupyter/api/kernels>
ProxyPass ws://localhost:8888/Jupyter/api/kernels
ProxyPassReverse ws://localhost:8888/Jupyter/api/kernels

<Location /Jupyter/terminals/>
ProxyPass ws://localhost:8888/Jupyter/terminals
ProxyPassReverse ws://localhost:8888/Jupyter/terminals

I need to look at the version of code you are using and see if I can propose a change you should be able to make in your local environment so the image builds correctly.

kchaksuvej commented 5 years ago

What do you need? Thanks

g8sman commented 5 years ago

It looks like you are using the most recent version of the recipe code base, is that correct? The quickest way to solve this in your environment is to change https://github.com/sassoftware/sas-container-recipes/blob/master/addons/ide-jupyter-python3/Dockerfile_http so that it looks like

ARG BASEIMAGE=viya-single-container
ARG BASETAG=latest

FROM $BASEIMAGE:$BASETAG

ARG PLATFORM=redhat
ARG PROJECT_NAME=sas-viya

USER root
COPY proxy.conf ./jpy3_proxy.conf

RUN set -e; \
     sed "s/localhost/$PROJECT_NAME-programming/g" ./jpy3_proxy.conf > /etc/httpd/conf.d/jpy3_proxy.conf; \

After doing that, rebuild and validate that the jpy3_proxy.conf contains localhost.

kchaksuvej commented 5 years ago

Will do. Thanks

kchaksuvej commented 5 years ago

It fixed the problem and I can start Jupyter. But when I try to test SAS Kernel with Jupyter. (https://communities.sas.com/t5/SAS-Communities-Library/Building-Docker-Recipes-and-running-SAS-Viya-Analytics-in-a/ta-p/510484)

options cashost="svc-ide-jupyter-python3" casport=5570; cas;

I got error:

SAS Connection established. Subprocess id is 12223

No encoding value provided. Will try to determine the correct encoding. Setting encoding to utf_8 based upon the SAS session encoding value of utf-8.

24 ods listing close;ods html5 (id=saspy_internal) file=stdout options(bitmap_mode='inline') device=svg style=HTMLBlue; ods graphics on / outputfmt=png; NOTE: Writing HTML5(SASPY_INTERNAL) Body file: STDOUT 25
26 options cashost="svc-ide-jupyter-python3" casport=5570; ERROR: The host name 'svc-ide-jupyter-python3' could not be found. 27 cas; ERROR: The host name 'svc-ide-jupyter-python3' could not be found. ERROR: Unable to connect to Cloud Analytic Services svc-ide-jupyter-python3 on port 5570. Verify connection parameters and retry. 28
29 ods html5 (id=saspy_internal) close;ods listing;

Any suggestions.

Thanks

dlawregiets commented 5 years ago

You could use the following to add additional hostnames in /etc/hosts until we can get a fix for this:

--add-host svc-ide-jupyter-python3:127.0.0.1

kchaksuvej commented 5 years ago

It worked but I have to use my server ip instead of 127.0.0.1 and add it in docker run...when create container.

I can run SAS code connect to CAS in jupyter but when I run python code connect to CAS, it failed Any suggestions Thanks

import swat s = swat.CAS("svc-ide-jupyter-python3", 5570) s.builtins.serverStatus()

import pandas as pd import matplotlib.pyplot as plt from IPython.core.display import display, HTML %matplotlib inline titanic3 = s.CASTable("titanic3", replace=True); s.upload_file('http://biostat.mc.vanderbilt.edu/wiki/pub/Main/DataSets/titanic3.csv', casout=titanic3) type(titanic3) titanic3.columnInfo()

ERROR: The TCP/IP tcpSockConnect support routine failed with error 111 (The connection was refused.). ERROR: Failed to connect to host 'svc-ide-jupyter-python3', port 5570.


SystemError Traceback (most recent call last) /usr/local/lib/python3.6/site-packages/swat/cas/connection.py in init(self, hostname, port, username, password, session, locale, nworkers, name, authinfo, protocol, *kwargs) 300 else: --> 301 self._sw_connection = clib.SW_CASConnection(params) 302

/usr/local/lib/python3.6/site-packages/swat/clib.py in SW_CASConnection(*args, *kwargs) 93 _import_pyswat() ---> 94 return _pyswat.SW_CASConnection(args, **kwargs) 95

SystemError: <class 'py36swat.SW_CASConnection'> returned NULL without setting an error

During handling of the above exception, another exception occurred:

SWATError Traceback (most recent call last)

in 1 import swat ----> 2 s = swat.CAS("svc-ide-jupyter-python3", 5570) 3 s.builtins.serverStatus() 4 5 import pandas as pd /usr/local/lib/python3.6/site-packages/swat/cas/connection.py in __init__(self, hostname, port, username, password, session, locale, nworkers, name, authinfo, protocol, **kwargs) 306 307 except SystemError: --> 308 raise SWATError(self._sw_error.getLastErrorMessage()) 309 310 # Set up index origin for error messages SWATError: Could not connect to 'svc-ide-jupyter-python3' on port 5570.
g8sman commented 5 years ago

Hi, if you are running a single container, you should not have to do

options cashost="svc-ide-jupyter-python3" casport=5570;

When you are logged in, everything is running on the localhost and you should be able to reference as such. Try

options cashost="localhost" casport=5570;

For python, do you get the same error if you use localhost?

kchaksuvej commented 5 years ago

I did not need option when I run SAS code in jupyter.

But in Jupyter Python,

If I try: import swat s = swat.CAS("svc-ide-jupyter-python3", 5570) I got error: ERROR: The TCP/IP tcpSockConnect support routine failed with error 111 (The connection was refused.). ERROR: Failed to connect to host 'svc-ide-jupyter-python3', port 5570.

If I try: import swat s = swat.CAS("localhost", 5570) I got error: ERROR: Could not find matching host, port, and user combination in netrc/authinfo file.

g8sman commented 5 years ago

What authentication addon did you use?

kchaksuvej commented 5 years ago

addons/auth-demo

This is what I use to build images

./build.sh --type single --zip /home/kchaksuvej/viya/SAS_Viya_deployment_data.zip --mirror-url http://172.21.0.1:8321 addons/auth-demo addons/ide-jupyter-python3

g8sman commented 5 years ago

While I need to redo this using the github code, I did the following with the 19m05 code base:

time ./build.sh --docker-namespace g8s-gh13 --docker-registry-url docker.company.com --zip SAS_Viya_deployment_data.zip --type single -k -a "addons/ide-jupyter-python3,addons/auth-demo"

Then copied over the sample run script

mkdir run
cp samples/viya-single-container/example_launchsas.sh run/launchsas.sh

I edited run/launchsas.sh and changed the image name and tag to the version I just built. I then did

cd run
./launchsas.sh

and then could http://localhost:8080/Jupyter and when I ran the code

import swat
s = swat.CAS("localhost", 5570)
s.builtins.serverStatus()

I got the following output

NOTE: Grid node action status report: 1 nodes, 7 total actions executed.
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/usr/local/lib/python3.6/site-packages/IPython/core/formatters.py in __call__(self, obj)
    343             method = get_real_method(obj, self.print_method)
    344             if method is not None:
--> 345                 return method()
    346             return None
    347         else:

/usr/local/lib/python3.6/site-packages/swat/cas/results.py in _repr_html_(self)
     89 
     90         '''
---> 91         if pdcom.in_qtconsole():
     92             return None
     93 

AttributeError: module 'pandas.core.common' has no attribute 'in_qtconsole'

[About]

 {'CAS': 'Cloud Analytic Services',
  'Version': '3.04',
  'VersionLong': 'V.03.04M0P07122018',
  'Copyright': 'Copyright © 2014-2018 SAS Institute Inc. All Rights Reserved.',
  'ServerTime': '2019-05-06T20:06:56Z',
  'System': {'Hostname': 'sas-programming',
   'OS Name': 'Linux',
   'OS Family': 'LIN X64',
   'OS Release': '3.10.0-862.14.4.el7.x86_64',
   'OS Version': '#1 SMP Wed Sep 26 15:12:11 UTC 2018',
   'Model Number': 'x86_64',
   'Linux Distribution': 'CentOS Linux release 7.6.1810 (Core)'},
  'license': {'site': '19m05 order 19w17 prod',
   'siteNum': 70180938,
   'expires': '24Apr2020:00:00:00',
   'gracePeriod': 45,
   'warningPeriod': 45,
   'maxCPUs': 9999}}

[server]

 Server Status

    nodes  actions
 0      1        7

[nodestatus]

 Node Status

               name        role  uptime  running  stalled
 0  sas-programming  controller   0.694        0        0

+ Elapsed: 0.00564s, user: 0.00544s, mem: 0.395mb

I will try with the current production code, but it should match what I did here in the example. I did use a different build command then you as well as I used the example launch.sas script. I will rebuild and post what I get.

kchaksuvej commented 5 years ago

Do I have to download new version and rebuild images?

Thanks

g8sman commented 5 years ago

I don't think so. I still need to build using the GitHub code, but feel confident that it should work for you in the same way it did for me. I will build this morning and let you know.

kchaksuvej commented 5 years ago

Thank you

g8sman commented 5 years ago

Here is what I did:

git clone git@github.com:sassoftware/sas-container-recipes.git
cd sas-container-recipes/
git pull
time ./build.sh --zip SAS_Viya_deployment_data..zip --type single -k -a "addons/ide-jupyter-python3/,addons/auth-demo"
mkdir run
cp samples/viya-single-container/example_launchsas.sh run/launchsas.sh
vi run/launchsas.sh
cd run/
./launchsas.sh

Went to http://localhost:8080/Jupyter and when I ran the code

import swat
s = swat.CAS("localhost", 5570)
s.builtins.serverStatus()

Which resulted in

NOTE: Grid node action status report: 1 nodes, 7 total actions executed.
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/usr/local/lib/python3.6/site-packages/IPython/core/formatters.py in __call__(self, obj)
    343             method = get_real_method(obj, self.print_method)
    344             if method is not None:
--> 345                 return method()
    346             return None
    347         else:

/usr/local/lib/python3.6/site-packages/swat/cas/results.py in _repr_html_(self)
     89 
     90         '''
---> 91         if pdcom.in_qtconsole():
     92             return None
     93 

AttributeError: module 'pandas.core.common' has no attribute 'in_qtconsole'

[About]

 {'CAS': 'Cloud Analytic Services',
  'Version': '3.04',
  'VersionLong': 'V.03.04M0P07122018',
  'Copyright': 'Copyright © 2014-2018 SAS Institute Inc. All Rights Reserved.',
  'ServerTime': '2019-05-07T16:30:58Z',
  'System': {'Hostname': 'sas-programming',
   'OS Name': 'Linux',
   'OS Family': 'LIN X64',
   'OS Release': '3.10.0-862.14.4.el7.x86_64',
   'OS Version': '#1 SMP Wed Sep 26 15:12:11 UTC 2018',
   'Model Number': 'x86_64',
   'Linux Distribution': 'CentOS Linux release 7.6.1810 (Core)'},
  'license': {'site': 'va',
   'siteNum': 70180938,
   'expires': '07Jul2019:00:00:00',
   'gracePeriod': 45,
   'warningPeriod': 46,
   'maxCPUs': 9999}}

[server]

 Server Status

    nodes  actions
 0      1        7

[nodestatus]

 Node Status

               name        role  uptime  running  stalled
 0  sas-programming  controller   0.176        0        0

+ Elapsed: 0.00313s, user: 0.00152s, sys: 0.00158s, mem: 0.332mb
kchaksuvej commented 5 years ago

It works... Thank you very much for your help.

Some questions. What are these folders for? sasdemo, sasinside ,cas.

My lic for SAS viya will expired next month? How can I deploy new lic to SAS viya docker that I build? Do I have to create new SAS mirror and rebuild images?

Thanks

g8sman commented 5 years ago

Good stuff! Glad that worked. The directories are covered on the wiki.

Applying a new license is not currently implemented in the entrypoint. For now, you would need to rebuild the image. You wouldn't have to mirror again, just use the same mirror and provide the new deployment_data.zip to the process. That is if that is what you get with a new license. Been sometime since I have seen a renewal email. We welcome merge requests if you want to give adding the functionality a try. If not, please open up a new ticket and we will see if we can get to it.

I am going to close this as you have had success in building and running the single image.

kchaksuvej commented 5 years ago

Thanks.