Coder Social home page Coder Social logo

Comments (1)

splmie avatar splmie commented on May 12, 2024

I found the solution by myself.

  1. Create kubernetes config map with spre.SETINIT_TEXT variable
  2. Put the content of your new SAS license into spre.SETINIT_TEXT.
  spre.SETINIT_TEXT: |
    PROC SETINIT RELEASE='V03';
    SITEINFO NAME='XXXXXXXX'
    SITE=123456789 OSNAME='LIN X64' RECREATE WARN=34 GRACE=62
    [..]
    SAVE; RUN;
  1. Inside the SPRE container set environment variable SETINIT_TEXT and initialize it with value of spre.SETINIT_TEXT from kubernetes config map.

TIP: you have to modify the manifest starting your SPRE container by putting this section

    spec:
      containers:
      - env:
        - name: SETINIT_TEXT
          valueFrom:
            configMapKeyRef:
              key: spre.SETINIT_TEXT
              name: spre-config
  1. entrypoint for the SPRE image need to be modified by putting that code before CAS starts
   echo;echo "===== [INFO] : Checking SAS license =====";

      if [ ! -z "${SETINIT_TEXT}" ]; then
          export SASLICENSEFILE="license.sas"
          export SASLICENSEDIR="/sasinside"
          echo;echo "===== [INFO] : Found new SAS license! =====";echo;
          echo;echo "${SETINIT_TEXT}";echo;
          echo;echo "===== [INFO] : Applying new SAS license =====";echo;
          echo "${SETINIT_TEXT}" > ${SASLICENSEDIR}/${SASLICENSEFILE}
          # Applying license to SAS Foundation
          sudo su -s "/bin/sh" -c "/opt/sas/spre/home/SASFoundation/utilities/bin/apply_license ${SASLICENSEDIR}/${SASLICENSEFILE}" sas
          # Applying license to CAS
          sudo su -s "/bin/sh" -c "ln -sf ${SASLICENSEDIR}/${SASLICENSEFILE} /opt/sas/viya/config/etc/cas/default/sas_license.txt" sas
      else
          echo;echo "===== [INFO] : No changes, skipping  =====";echo;
      fi

from sas-container-recipes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.