Engineering

 View Only
  • 1.  Rhapsody in a Docker Container

    Posted 17 days ago
    Hi everyone, 

    has anyone successfully installed Rhapsody V9.0.1 on a Windows Docker Container? 

    I managed to install Rhapsody via a basic silent install script on a Docker Container. However, when executing check model, I'll get the following error:
    • Rhapsody exited with returncode = -1073741515
    I used the Windows as Base Image from (Windows by Microsoft | Docker Hub) and tried server and regular windows versions without success. 

    Can anyone help to install the Rhapsody on a windows Docker and perform CL operations?

    Thanks in advance. 


    ------------------------------
    Robert Zisler
    ------------------------------


  • 2.  RE: Rhapsody in a Docker Container

    Posted 16 days ago

    Hello Robert,
    I use Rhapsody in docker.
    It took me a while to get it working in 9.0.1 because you now need a bigger version of the Windows base image.
    I told IBM about this since previous versions were happy with a smaller windows base image.
    Basically my dockerfile starts with - 
    FROM mcr.microsoft.com/windows:1809-amd64



    ------------------------------
    Duncan Perrett
    ------------------------------



  • 3.  RE: Rhapsody in a Docker Container

    Posted 13 days ago
    Hello Duncan, 

    thank you for your advice. 

    Were it in your case needed to install other software as well or were you able to just run a silentinstall.bat and it worked?



    ------------------------------
    Robert Zisler
    ------------------------------



  • 4.  RE: Rhapsody in a Docker Container

    Posted 13 days ago
    Edited by Duncan Perrett 13 days ago
    Here is my dockerfile, I use 7-zip to extract the Rhapsody msi installer - 

    # Use an older Windows Server Core image with .NET Framework 4.8
    FROM mcr.microsoft.com/windows:1809-amd64
    USER ContainerAdministrator
    SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

    ENV JAVA_VERSION 11.0.7
    ENV JAVA_BUILD 11

    RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls, [Net.SecurityProtocolType]::Tls11, [Net.SecurityProtocolType]::Tls12, [Net.SecurityProtocolType]::Ssl3 ;\
    Invoke-WebRequest https://download.visualstudio.microsoft.com/download/pr/89f0ba2a-5879-417b-ba1d-debbb2bde208/b22a9e9e4d513e4d409d2222315d536b/dotnet-sdk-6.0.200-win-x64.exe \
    -OutFile 'c:\\dotnet-sdk-6.0.200-win-x64.exe' -UseBasicParsing; \
    Start-Process -FilePath 'c:\\dotnet-sdk-6.0.200-win-x64.exe' -ArgumentList '/quiet', '/NoRestart' -Wait; \
    Remove-Item 'c:\\dotnet-sdk-6.0.200-win-x64.exe';

    RUN Invoke-WebRequest "https://artifactory-na.mycompany.com/artifactory/ce-devops-common-java-jdk-generic-stable-local/jdk-11.0.7_windows-x64_bin.exe" -WebSession $Session -OutFile C:\jre-$env:JAVA_VERSION-windows-x64.exe; \
    Start-Process -FilePath C:\jre-$env:JAVA_VERSION-windows-x64.exe -passthru -wait -argumentlist "/s,INSTALLDIR=c:\Java\jre,/L,install64.log"; \
    Remove-Item C:\jre-$env:JAVA_VERSION-windows-x64.exe

    ENV JAVA_HOME C:\\Java\\jre

    RUN setx /M PATH $(${Env:PATH} + \";${Env:JAVA_HOME}\bin\")

    # Install 7zip
    RUN Invoke-WebRequest "https://www.7-zip.org/a/7z2107-x64.msi" -OutFile "C:\\temp\\7z2107-x64.msi";
    #Run 7zip Installer
    RUN Start-Process msiexec '/i C:\\temp\\7z2107-x64.msi INSTALLDIR=C:\\7Zip /qn' -Wait
    RUN Get-ChildItem -Path C:\\7Zip\\ -Force
    RUN rm C:\\temp\\7z2107-x64.msi

    # Download and install the Visual Studio Redistributables
    ADD https://aka.ms/vs/16/release/vc_redist.x64.exe C:\\temp\\vcredist.exe
    RUN Start-Process -FilePath C:\\temp\\vcredist.exe -ArgumentList '/quiet' -Wait ;

    RUN New-Item -Path "C:\\installs\\Rhapsody9" -ItemType 'directory'; New-Item -Path "C:\Projects\Rhapsody" -ItemType 'directory'; New-Item -Path "C:\\curl" -ItemType 'directory'; New-Item -Path "C:\\BuildTools" -ItemType 'directory'

    COPY software\* 'C:\\temp\\'
    RUN Get-ChildItem -Path C:\\temp\\ -Force

    SHELL ["cmd", "/S", "/C"]

    ADD https://aka.ms/vs/16/release/vs_buildtools.exe C:\\temp\\vs_buildtools.exe

    RUN C:\temp\vs_buildtools.exe --quiet --norestart --wait --nocache --installPath "C:\BuildTools\2019\Professional" --add Microsoft.VisualStudio.Workload.MSBuildTools --add Microsoft.VisualStudio.Workload.UniversalBuildTools --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --add Microsoft.VisualStudio.Component.VC.ATLMFC --remove Microsoft.VisualStudio.Component.Windows10SDK.10240 --remove Microsoft.VisualStudio.Component.Windows10SDK.10586 --remove Microsoft.VisualStudio.Component.Windows10SDK.14393 --remove Microsoft.VisualStudio.Component.Windows81SDK || IF "%ERRORLEVEL%"=="3010" EXIT 0 && powershell set-executionpolicy remotesigned

    SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'Continue'; $verbosePreference='Continue';"]

    RUN Get-ChildItem -Path C:\\BuildTools\\2019\\Professional\\ -Recurse -Force
    RUN rm C:\\temp\\vs_buildtools.exe

    # Check the install location for nmake.exe, it should be C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\Hostx64\x64\nmake.exe but the install path has been hard-coded above to C:\BuildTools so eg: C:\BuildTools\VC\Tools\MSVC\14.28.29333\bin\Hostx64\x64
    # Prove existence of crtdbg.h in BuildTools
    RUN Get-ChildItem -Path C:\\BuildTools\\ -Recurse -Force
    # prepend Build Tools nmake.exe path to the PATH ENV VAR - is this still required ?
    RUN [System.Environment]::SetEnvironmentVariable('PATH', $Env:Path + ';C:\BuildTools\2019\Professional\VC\Tools\MSVC\14.28.29333\bin\Hostx64\x86', 'Machine')

    # Set TELELOGIC_LICENSE_FILE to either the evaluation license file or the license server
    RUN [System.Environment]::SetEnvironmentVariable('TELELOGIC_LICENSE_FILE', '7500@SERVER.mycompany.com', 'Machine')
    RUN setx TELELOGIC_LICENSE_FILE 7500@SERVER.mycompany.com

    # Set the Visual Studio 2019 env var to point to the VS Build Tools folder
    # RUN setx VS_2019_PATH C:\\BuildTools
    # Set VS_2019_PATH to C:\\BuildTools
    RUN [System.Environment]::SetEnvironmentVariable('VS_2019_PATH', 'C:\BuildTools', 'Machine')

    # Download Rhapsody zips (into temp folder) from Artifactory
    RUN Invoke-WebRequest -Uri 'https://artifactory-na.mycompany.com/artifactory/ce-devops-common-qnx-sdp-generic-stable-local/ratlRhapsody_9.0_Windows_64.zip.001' -UseBasicParsing -OutFile "C:\\temp\\ratlRhapsody_9.0_Windows_64.zip.001";
    RUN Invoke-WebRequest -Uri 'https://artifactory-na.mycompany.com/artifactory/ce-devops-common-qnx-sdp-generic-stable-local/ratlRhapsody_9.0_Windows_64.zip.002' -UseBasicParsing -OutFile "C:\\temp\\ratlRhapsody_9.0_Windows_64.zip.002";
    RUN Invoke-WebRequest -Uri 'https://artifactory-na.mycompany.com/artifactory/ce-devops-common-qnx-sdp-generic-stable-local/ratlRhapsody_9.0_Windows_64.zip.003' -UseBasicParsing -OutFile "C:\\temp\\ratlRhapsody_9.0_Windows_64.zip.003";
    RUN Invoke-WebRequest -Uri 'https://artifactory-na.mycompany.com/artifactory/ce-devops-common-qnx-sdp-generic-stable-local/ratlRhapsody_9.0_Windows_64.zip.004' -UseBasicParsing -OutFile "C:\\temp\\ratlRhapsody_9.0_Windows_64.zip.004";
    RUN Invoke-WebRequest -Uri 'https://artifactory-na.mycompany.com/artifactory/ce-devops-common-qnx-sdp-generic-stable-local/ratlRhapsody_9.0_Windows_64.zip.005' -UseBasicParsing -OutFile "C:\\temp\\ratlRhapsody_9.0_Windows_64.zip.005";
    RUN Invoke-WebRequest -Uri 'https://artifactory-na.mycompany.com/artifactory/ce-devops-common-qnx-sdp-generic-stable-local/ratlRhapsody_9.0_Windows_64.zip.006' -UseBasicParsing -OutFile "C:\\temp\\ratlRhapsody_9.0_Windows_64.zip.006";
    RUN Invoke-WebRequest -Uri 'https://artifactory-na.mycompany.com/artifactory/ce-devops-common-qnx-sdp-generic-stable-local/ratlRhapsody_9.0_Windows_64.zip.007' -UseBasicParsing -OutFile "C:\\temp\\ratlRhapsody_9.0_Windows_64.zip.007";
    RUN Invoke-WebRequest -Uri 'https://artifactory-na.mycompany.com/artifactory/ce-devops-common-qnx-sdp-generic-stable-local/ratlRhapsody_9.0_Windows_64.zip.008' -UseBasicParsing -OutFile "C:\\temp\\ratlRhapsody_9.0_Windows_64.zip.008";
    RUN Invoke-WebRequest -Uri 'https://artifactory-na.mycompany.com/artifactory/ce-devops-common-qnx-sdp-generic-stable-local/ratlRhapsody_9.0_Windows_64.zip.009' -UseBasicParsing -OutFile "C:\\temp\\ratlRhapsody_9.0_Windows_64.zip.009";
    RUN Invoke-WebRequest -Uri 'https://artifactory-na.mycompany.com/artifactory/ce-devops-common-qnx-sdp-generic-stable-local/ratlRhapsody_9.0_Windows_64.zip.010' -UseBasicParsing -OutFile "C:\\temp\\ratlRhapsody_9.0_Windows_64.zip.010";
    RUN Invoke-WebRequest -Uri 'https://artifactory-na.mycompany.com/artifactory/ce-devops-common-qnx-sdp-generic-stable-local/ratlRhapsody_9.0_Windows_64.zip.011' -UseBasicParsing -OutFile "C:\\temp\\ratlRhapsody_9.0_Windows_64.zip.011";
    RUN Invoke-WebRequest -Uri 'https://artifactory-na.mycompany.com/artifactory/ce-devops-common-qnx-sdp-generic-stable-local/ratlRhapsody_9.0_Windows_64.zip.012' -UseBasicParsing -OutFile "C:\\temp\\ratlRhapsody_9.0_Windows_64.zip.012";
    RUN Invoke-WebRequest -Uri 'https://artifactory-na.mycompany.com/artifactory/ce-devops-common-qnx-sdp-generic-stable-local/ratlRhapsody_9.0_Windows_64.zip.013' -UseBasicParsing -OutFile "C:\\temp\\ratlRhapsody_9.0_Windows_64.zip.013";
    RUN Invoke-WebRequest -Uri 'https://artifactory-na.mycompany.com/artifactory/ce-devops-common-qnx-sdp-generic-stable-local/ratlRhapsody_9.0_Windows_64.zip.014' -UseBasicParsing -OutFile "C:\\temp\\ratlRhapsody_9.0_Windows_64.zip.014";
    RUN Invoke-WebRequest -Uri 'https://artifactory-na.mycompany.com/artifactory/ce-devops-common-qnx-sdp-generic-stable-local/ratlRhapsody_9.0_Windows_64.zip.015' -UseBasicParsing -OutFile "C:\\temp\\ratlRhapsody_9.0_Windows_64.zip.015";

    # combine and extract zip files
    RUN Start-Process -Wait -FilePath C:\\7Zip\\7z.exe -ArgumentList 'x C:\\temp\\ratlRhapsody_9.0_Windows_64.zip.001 -oC:\\installs\\Rhapsody9';
    RUN Remove-Item 'C:\\temp\\ratlRhapsody_9.0_Windows_64.zip.001'; Remove-Item 'C:\\temp\\ratlRhapsody_9.0_Windows_64.zip.002'; Remove-Item 'C:\\temp\\ratlRhapsody_9.0_Windows_64.zip.003'; Remove-Item 'C:\\temp\\ratlRhapsody_9.0_Windows_64.zip.004'; Remove-Item 'C:\\temp\\ratlRhapsody_9.0_Windows_64.zip.005'; \
    Remove-Item 'C:\\temp\\ratlRhapsody_9.0_Windows_64.zip.006'; Remove-Item 'C:\\temp\\ratlRhapsody_9.0_Windows_64.zip.007'; Remove-Item 'C:\\temp\\ratlRhapsody_9.0_Windows_64.zip.008'; Remove-Item 'C:\\temp\\ratlRhapsody_9.0_Windows_64.zip.009'; Remove-Item 'C:\\temp\\ratlRhapsody_9.0_Windows_64.zip.010'; \
    Remove-Item 'C:\\temp\\ratlRhapsody_9.0_Windows_64.zip.011'; Remove-Item 'C:\\temp\\ratlRhapsody_9.0_Windows_64.zip.012'; Remove-Item 'C:\\temp\\ratlRhapsody_9.0_Windows_64.zip.013'; Remove-Item 'C:\\temp\\ratlRhapsody_9.0_Windows_64.zip.014'; Remove-Item 'C:\\temp\\ratlRhapsody_9.0_Windows_64.zip.015';

    RUN Copy-Item -Path 'C:\\installs\\Rhapsody9\\IBM Engineering Systems Design Rhapsody 9.0 64bit.msi' -Destination 'C:\\installs\\Rhapsody9\\IBM_Engineering_Systems_Design_Rhapsody_9.0_64bit.msi'

    RUN Start-Process msiexec '/i C:\installs\Rhapsody9\IBM_Engineering_Systems_Design_Rhapsody_9.0_64bit.msi /quiet /L*V Rhapsody9InstallLogFile.txt INSTALLDIR=C:\Projects\Rhapsody RHAPSODYEDITION=Development INSTALL_ALL_IN_ONE_LOCATION=1 IS_LANG_C=1 IS_LANG_CPP=1 TELELOGIC_LICENSE_FILE=C:\temp\license.dat LAPAGREE=\"Yes\"' -Wait

    RUN Start-Process -UseNewEnvironment -Wait -FilePath C:\\Projects\\Rhapsody\\RhapsodyCL.exe -ArgumentList '-verbose -dev_ed -lang=cpp -cmd=open C:\Projects\Rhapsody\Samples\CppSamples\Dishwasher\Dishwasher.rpy -cmd=regenerate EXE Host'
    RUN Get-ChildItem -Path C:\\Projects\\\Rhapsody\\Samples\\CppSamples\\Dishwasher\\EXE\\Host -Force

    WORKDIR "C:\repo"

    ENTRYPOINT ["powershell", "-NonInteractive", "-ExecutionPolicy", "ByPass", "./build.ps1"]

    ------------------------------
    Duncan Perrett
    ------------------------------



  • 5.  RE: Rhapsody in a Docker Container

    Posted 13 days ago
    Thank you very much. I'll check it out and test if it works on my environment as well.

    ------------------------------
    Robert Zisler
    ------------------------------