Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login
    1. Home
    2. philippe.camelio_3885
    3. Posts

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    P Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 81
    • Posts 272
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: OTTER / Docker - Move to a new server - lost connection to linux server - (Finally it is working fine !)

      I thought to, but the encryption key is set in the docker-compose file and I moved all the data to the new server.

      Is there any way to check the encryption key on the new server ?

      ================
      I am using the following config:

      • docker-compose.yml
      • .env
      • config/sql/01.sql
      • config/entrypoint.sh

      docker-compose.yml

      version: '3.8'
      services:
        otter:
          image: proget.inedo.com/productimages/inedo/otter:${OTTER_VERSION:-22}
          container_name: otter
          restart: unless-stopped
          environment:
            OTTER_SQL_CONNECTION_STRING: "${OTTER_SQL_CONNECTION_STRING}"
            TZ: "${TZ:-Europe/Paris}"
            OTTER_ENCRYPTION_KEY: "${OTTER_ENCRYPTION_KEY}"
          volumes:
            - ${OTTER_ROOT:-./volumes}/data:/var/otter
          ports:
            - "${OTTER_PORT:-8080}:80"
          networks:
            net-otter:
            net-sql:
      
          depends_on:
            - otter-sql
      
        otter-sql:
          image: mcr.microsoft.com/mssql/server:${OTTER_MSSQL_VERSION:-2022-latest}
          user: root
          container_name: otter-sql
          restart: unless-stopped
          ports:
            - "${OTTER_MSSQL_PORT:-1433}:1433"
          networks:
            net-sql:
      
          environment:
            TZ: "${TZ:-Europe/Paris}"
            ACCEPT_EULA: Y
            MSSQL_SA_PASSWORD: "${OTTER_MSSQL_SA_PASSWORD:-P@ssw0rd}"
            MSSQL_PID: "${OTTER_MSSQL_EDITION:-Express}"
      # Optional if using persisted storage locations (https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-docker-container-configure?view=sql-server-ver15&pivots=cs1-bash#persist)
          volumes:
            - ${OTTER_ROOT:-./volumes}/sql/data:/var/opt/mssql/data
            - ${OTTER_ROOT:-./volumes}/sql/log:/var/opt/mssql/log
            - ${OTTER_ROOT:-./volumes}/sql/secrets:/var/opt/mssql/secrets
            - ./config/sql:/docker-entrypoint-initdb.d
          restart: always
          working_dir: /docker-entrypoint-initdb.d
          command: sh -c ' chmod +x ./entrypoint.sh; ./entrypoint.sh ${OTTER_MSSQL_SA_PASSWORD:-P@ssw0rd} & /opt/mssql/bin/sqlservr;'
      
      networks:
        net-otter:
        net-sql:
      

      .env

      TZ=Europe/Paris
      REGISTRY_PUBLIC=proget.ocapiat.fr/public-docker
      REGISTRY_PRIVE=proget.ocapiat.fr/internal-docker
      
      OTTER_MSSQL_SA_PASSWORD=StrongP@ssw0rd
      OTTER_MSSQL_EDITION=Express
      OTTER_MSSQL_PORT=1450
      OTTER_MSSQL_VERSION=2022-CU5-ubuntu-20.04
      
      OTTER_VERSION=22
      OTTER_PORT=8080
      OTTER_ROOT=./volumes/otter
      
      OTTER_SQL_CONNECTION_STRING="Data Source=tcp:otter-sql,1433;Initial Catalog=Otter; User ID=sa; Password=${OTTER_MSSQL_SA_PASSWORD:-P@ssw0rd}"
      OTTER_ENCRYPTION_KEY=Str@ngEncrypti0nKey
      
      POSTFIX_IMAGE_VERSION=1.0.0
      POSTFIX_IMAGE=${REGISTRY_PRIVE}/maestro/postfix-relay
      

      01.sql

      USE MASTER;
      GO
      IF NOT EXISTS (SELECT name FROM sys.databases WHERE name = 'OTTER')
      CREATE DATABASE [Otter] COLLATE SQL_Latin1_General_CP1_CI_AS
      GO
      

      entrypoint.sh

      #!/bin/bash
      sleep 3s
      # run the init script to create the DB and the tables in /table
      for entry in "*.sql"
      do
        echo executing $entry
        /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P $1 -i $entry
      done
      
      posted in Support
      P
      philippe.camelio_3885
    • OTTER / Docker - Move to a new server - lost connection to linux server - (Finally it is working fine !)

      Hello guys,

      I have to move my Otter server (under docker).
      I thought it would be easy (docker-compose down / tar / scp / untar / docker-compose up) but I had a serious problem with SSH Key connection.

      On the new server, none of the linux servers can be connected.
      I have this error message for all of them:

      Unhandled exception: Invalid signature for supplied public key, or bad username/public key combination
      

      I tried to recreate the SSH key unsuccessfully

      Any thoughts ?

      Otter version : proget.inedo.com/productimages/inedo/otter:22
      SQL Server version : mcr.microsoft.com/mssql/server:2022-CU5-ubuntu-20.04

      posted in Support
      P
      philippe.camelio_3885
    • OT - Minor Bug In Job Template

      Hi,

      Small visual bug when you create a Job Template, root scripts folders are displayed as Unknown / Unkonwn Langage where as they should be hidden - I guess

      b8b84444-f1a9-41da-a678-079a7aefd7f7-image.png

      Cheers
      Philippe

      OTTER : 2022.11 (docker image)

      posted in Support
      P
      philippe.camelio_3885
    • RE: OT - running shell script displays an error message while it should not

      Hi @atripp
      Thanks for the tips.

      Best regards

      Philippe

      posted in Support
      P
      philippe.camelio_3885
    • OT - running shell script displays an error message while it should not

      Hello

      I have a shell script, which clone a git repo and run few command.
      Directly from the server, it is working properly.

      From Otter, as SHCall, it reports ERROR while is it just echo or result of the command line.
      Results below of a small script shell

      echo ==>  install-monitor sur $(hostname)
      git clone https://oauth:********@********/monitor.git /opt/monitor
      
      DEBUG: 2023-07-17 11:54:18Z - Job will be run against servers sequentially (not asynchronously).
      DEBUG: 2023-07-17 11:54:18Z - Targeting servers: VMXXXXXX
      DEBUG: 2023-07-17 11:54:18Z - Beginning execution run...
      INFO : 2023-07-17 11:54:19Z - ==> install-monitor sur VMXXXXXX
      ERROR: 2023-07-17 11:54:20Z - Cloning into '/opt/monitor'...
      

      How to avoid such behaviour and keep real ERROR

      I have plenty of working shell scripts I have to run through Otter

      Best regards
      Philippe

      Running : Otter Version 2022.11 / docker

      posted in Support linux otter
      P
      philippe.camelio_3885
    • BM - Editing OSCall Operation using Visual Editor not working anymore

      Hi,

      OScall function is no longer working properly from visual editor since last update BM-2022-12 (docker image).

      This was working before Buildmaster 2022.10

      Test case :
      Create an app (blank)
      Create a new otterscript script called main
      In main script, try to add the Build script:

      • Add statement
      • Search for OSCall and add Build (OSCall Build)
      >> Error msg : OSCall is missing the required ScriptName argument.
      

      Trying to add a script from Global is not working either

      Editing the otter script in Text Editor and using the syntax

      # Call function
      {
          OSCall Build;
      }
      

      overcomes the problem : ie the main script works, but edit the OSCall block from Visual editor is not working:

      Script Build does not exist.
      

      Best regards
      Philippe

      posted in Support
      P
      philippe.camelio_3885
    • RE: OT - SSH Secure Credentials Private Key ed25519

      @apxltd said in OT - SSH Secure Credentials Private Key ed25519:

      Thanks for clarifying @philippe-camelio_3885. I see the issue in the code now. I think it's been this way for quite a while 😅

      😂

      Thanks for your reply

      posted in Support
      P
      philippe.camelio_3885
    • RE: OT - SSH Secure Credentials Private Key ed25519

      Hi

      There are 2 bugs.

      1. when you display the secure cred, the public key is not properly written. it should be ssh-ed25519 instead ssh-rsa. The key itself is good.
      2. In the "Show secret" page, it should be a string.

      But it is just visual, ssh connections are working fine.

      Best regards
      Philippe

      posted in Support
      P
      philippe.camelio_3885
    • OT - SSH Secure Credentials Private Key ed25519

      Hi,
      Small bug for Private Key.
      I created an ed25519 ssh key and added it as a secure credentials.

      "Edit Secure Credential" is not working properly.

      Public key is seen as ssh-rsa while it should be ssh-ed25519.
      ea54bbab-1574-4a88-a571-667e2a564934-image.png

      and if you "Show Secret Fileds", public key is not OK

      0c3fb23d-ca41-4f38-a777-26143c991486-image.png

      But ssh access is working fine 👍

      posted in Support
      P
      philippe.camelio_3885
    • RE: OT - Credential Property broken ?

      👍
      I thought I was wrong

      posted in Support
      P
      philippe.camelio_3885
    • RE: OT - Credential Property broken ?

      @atripp said in OT - Credential Property broken ?:

      or confirming that it was broken, I took a closer look and figured it out :)

      I made new test form fresh install

      • 22.0.10 -> test OK
      • 22.0.9 -> OK
      • update 22.0.9 to 22.0.10 -> test OK

      I don't understand why the instance I am working on is not ok.
      There is no bug, I apologized .

      I will restart a new fresh instance and i reimport what I have already done.

      Thanks for you time

      posted in Support
      P
      philippe.camelio_3885
    • RE: OT - Credential Property broken ?

      😥
      I have done exactly what you did and the pb is still there.
      I really don't understand.

      Next week, I'll make a test on fresh install and I will update the thread.

      Thanks for your time
      Best regards
      PhilippeC.

      posted in Support
      P
      philippe.camelio_3885
    • RE: OT - Credential Property broken ?

      I understand.
      I checked twice and found nothing in double.

      I created a new Credential test. ==> Same problem. I don't see what I am doing wrong 😞

      otter script very simple:

        set $CredentialUser = $CredentialProperty(test, Username);
        set $CredentialPwd = $CredentialProperty(test, Password);
      

      also tried with :

       set $CredentialUser = $SecureCredentialProperty(test, Username);
       set $CredentialPwd = $SecureCredentialProperty(test, Password);
      

      to be more complete, this the docker version

      posted in Support
      P
      philippe.camelio_3885
    • OT - Credential Property broken ?

      Hi,
      Bug or not ?
      it seems it is no longer possible to get Password from Secure Credentials.
      It is not possible to read the Password from Secure Credential
      Same result if OtterScript usage is unchecked (tested just in case ...)

      • Create a secure crednetial as "Username & Password" and allow OtterScript usage
        6a080e1f-6b10-4f45-9d55-47f6058d69d6-image.png

      • Create an otter script

        set $CredentialUser = $CredentialProperty(svc-inedo, Username);
        set $CredentialPwd = $CredentialProperty(svc-inedo, Password);
      

      306927a6-72d1-48ea-926d-118003c852f6-image.png

      This was working on OT v2.2.23 / tested OT v2022.10

      Best regards
      PhilippeC.

      posted in Support otter
      P
      philippe.camelio_3885
    • RE: Sync BM from OT

      Import of the Otter / Administration / Export, => OK
      Import of url result => (commas are gone ????) but KO
      16b29674-7b3a-4ae7-899f-34a394fad09a-image.png

      =================================
      OTTER / Administration / Export

      {
        "servers": [
          {
            "active": true,
            "environments": [],
            "roles": [],
            "serverType": "local",
            "drift": "none",
            "name": "LOCALHOST",
            "variables": {}
          },
          {
            "active": true,
            "environments": [
              "deploiement"
            ],
            "roles": [
              "l-000-base",
              "dc-dcs"
            ],
            "serverType": "ssh",
            "hostName": "VM004001",
            "port": 22,
            "credentialsName": "ubuntu_test_20.04",
            "drift": "none",
            "tempPath": "/tmp/otter2023",
            "name": "VM004001",
            "variables": {}
          },
          {
            "active": true,
            "environments": [
              "deploiement"
            ],
            "roles": [
              "w-100-baseline",
              "w-010-modules-dbatools"
            ],
            "serverType": "windows",
            "hostName": "VM000127",
            "port": 46336,
            "encryptionType": "aes",
            "encryptionKey": "******************************************************************",
            "drift": "manuallyRemediate",
            "name": "VM000127",
            "variables": {}
          }
        ],
        "environments": [
          {
            "name": "integration",
            "variables": {}
          },
          {
            "name": "developpement",
            "variables": {}
          },
          {
            "name": "production",
            "variables": {}
          },
          {
            "parentName": "developpement",
            "name": "recette",
            "variables": {}
          },
          {
            "name": "deploiement",
            "variables": {}
          }
        ],
        "roles": [
          {
            "dependencies": [],
            "name": "l-000-base",
            "variables": {}
          },
          {
            "dependencies": [],
            "name": "dc-p16",
            "variables": {
              "DC": "P16"
            }
          },
          {
            "dependencies": [],
            "name": "dc-dcs",
            "variables": {
              "DC": "DCS"
            }
          },
          {
            "dependencies": [],
            "name": "w-000-base",
            "variables": {}
          },
          {
            "dependencies": [
              "w-000-base"
            ],
            "name": "w-010-modules-base",
            "variables": {
              "PSModules": "[\n{\u0022Nom\u0022: \u0022Carbon\u0022,\u0022Version\u0022: \u00222.13.0\u0022},\n{\u0022Nom\u0022: \u0022ActiveDirectoryDsc\u0022,\u0022Version\u0022: \u00226.2.0\u0022}\n]"
            }
          },
          {
            "dependencies": [
              "w-010-modules-base"
            ],
            "name": "w-100-baseline",
            "variables": {}
          },
          {
            "dependencies": [],
            "name": "w-010-modules-dbatools",
            "variables": {
              "PSModules": "[\n{\n\t\t\u0022Nom\u0022: \u0022dbatools\u0022,\n\t\t\u0022Version\u0022: \u00222.0.3\u0022\n\t},\n{\n\t\t\u0022Nom\u0022: \u0022dbachecks\u0022,\n\t\t\u0022Version\u0022: \u00222.0.18\u0022\n\t}\n]"
            }
          }
        ]
      }
      

      URL result

      {"Servers":[{"Active":true,"Environments":[],"Roles":[],"ServerType":"local","HostName":null,"Port":null,"EncryptionType":null,"EncryptionKey":null,"RequireSSL":null,"UniqueId":null,"AllowedIPAddresses":null,"CredentialsType":null,"CredentialsName":null,"Drift":"none","TempPath":null,"WSManUrl":null,"Id":1,"Name":"LOCALHOST","Variables":{}},{"Active":true,"Environments":["deploiement"],"Roles":["l-000-base","dc-dcs"],"ServerType":"ssh","HostName":"VM004001","Port":22,"EncryptionType":null,"EncryptionKey":null,"RequireSSL":null,"UniqueId":null,"AllowedIPAddresses":null,"CredentialsType":null,"CredentialsName":"ubuntu_test_20.04","Drift":"none","TempPath":"/tmp/otter2023","WSManUrl":null,"Id":1002,"Name":"VM004001","Variables":{}},{"Active":true,"Environments":["deploiement"],"Roles":["w-100-baseline","w-010-modules-dbatools"],"ServerType":"windows","HostName":"VM000127","Port":46336,"EncryptionType":"aes","EncryptionKey":"********************************************************","RequireSSL":null,"UniqueId":null,"AllowedIPAddresses":null,"CredentialsType":null,"CredentialsName":null,"Drift":"manuallyRemediate","TempPath":null,"WSManUrl":null,"Id":1003,"Name":"VM000127","Variables":{}}],"Environments":[{"ParentEnvironmentName":null,"ParentEnvironmentSet":true,"Id":1,"Name":"integration","Variables":{}},{"ParentEnvironmentName":null,"ParentEnvironmentSet":true,"Id":2,"Name":"developpement","Variables":{}},{"ParentEnvironmentName":null,"ParentEnvironmentSet":true,"Id":3,"Name":"production","Variables":{}},{"ParentEnvironmentName":"developpement","ParentEnvironmentSet":true,"Id":4,"Name":"recette","Variables":{}},{"ParentEnvironmentName":null,"ParentEnvironmentSet":true,"Id":5,"Name":"deploiement","Variables":{}}],"Roles":[{"Dependencies":[],"Id":2,"Name":"l-000-base","Variables":{}},{"Dependencies":[],"Id":3,"Name":"dc-p16","Variables":{"DC":{"Value":"P16","TypeCode":"S","Sensitive":false}}},{"Dependencies":[],"Id":4,"Name":"dc-dcs","Variables":{"DC":{"Value":"DCS","TypeCode":"S","Sensitive":false}}},{"Dependencies":[],"Id":6,"Name":"w-000-base","Variables":{}},{"Dependencies":["w-000-base"],"Id":7,"Name":"w-010-modules-base","Variables":{"PSModules":{"Value":"[\n{\"Nom\": \"Carbon\",\"Version\": \"2.13.0\"},\n{\"Nom\": \"ActiveDirectoryDsc\",\"Version\": \"6.2.0\"}\n]","TypeCode":"S","Sensitive":false}}},{"Dependencies":["w-010-modules-base"],"Id":8,"Name":"w-100-baseline","Variables":{}},{"Dependencies":[],"Id":9,"Name":"w-010-modules-dbatools","Variables":{"PSModules":{"Value":"[\n{\n\t\t\"Nom\": \"dbatools\",\n\t\t\"Version\": \"2.0.3\"\n\t},\n{\n\t\t\"Nom\": \"dbachecks\",\n\t\t\"Version\": \"2.0.18\"\n\t}\n]","TypeCode":"S","Sensitive":false}}}]}
      
      posted in Support
      P
      philippe.camelio_3885
    • RE: Sync BM from OT

      json is not valid there are too many commas 🙄

      posted in Support
      P
      philippe.camelio_3885
    • RE: Sync BM from OT

      no errors

      {
        "Servers":
          [
            {
              "Active": true,
              "Environments": [],
              "Roles": [],
              "ServerType": "local",
              "HostName": null,
              "Port": null,
              "EncryptionType": null,
              "EncryptionKey": null,
              "RequireSSL": null,
              "UniqueId": null,
              "AllowedIPAddresses": null,
              "CredentialsType": null,
              "CredentialsName": null,
              "Drift": "none",
              "TempPath": null,
              "WSManUrl": null,
              "Id": 1,
              "Name": "LOCALHOST",
              "Variables": {},
            },
            {
              "Active": true,
              "Environments": ["deploiement"],
              "Roles": ["l-000-base", "dc-dcs"],
              "ServerType": "ssh",
              "HostName": "VM004001",
              "Port": 22,
              "EncryptionType": null,
              "EncryptionKey": null,
              "RequireSSL": null,
              "UniqueId": null,
              "AllowedIPAddresses": null,
              "CredentialsType": null,
              "CredentialsName": "ubuntu_test_20.04",
              "Drift": "none",
              "TempPath": "/tmp/otter2023",
              "WSManUrl": null,
              "Id": 1002,
              "Name": "VM004001",
              "Variables": {},
            },
            {
              "Active": true,
              "Environments": ["deploiement"],
              "Roles": ["w-000-base"],
              "ServerType": "windows",
              "HostName": "VM000127",
              "Port": 46336,
              "EncryptionType": "aes",
              "EncryptionKey": "********************************************************",
              "RequireSSL": null,
              "UniqueId": null,
              "AllowedIPAddresses": null,
              "CredentialsType": null,
              "CredentialsName": null,
              "Drift": "manuallyRemediate",
              "TempPath": null,
              "WSManUrl": null,
              "Id": 1003,
              "Name": "VM000127",
              "Variables": {},
            },
          ],
        "Environments":
          [
            {
              "ParentEnvironmentName": null,
              "ParentEnvironmentSet": true,
              "Id": 1,
              "Name": "integration",
              "Variables": {},
            },
            {
              "ParentEnvironmentName": null,
              "ParentEnvironmentSet": true,
              "Id": 2,
              "Name": "developpement",
              "Variables": {},
            },
            {
              "ParentEnvironmentName": null,
              "ParentEnvironmentSet": true,
              "Id": 3,
              "Name": "production",
              "Variables": {},
            },
            {
              "ParentEnvironmentName": "developpement",
              "ParentEnvironmentSet": true,
              "Id": 4,
              "Name": "recette",
              "Variables": {},
            },
            {
              "ParentEnvironmentName": null,
              "ParentEnvironmentSet": true,
              "Id": 5,
              "Name": "deploiement",
              "Variables": {},
            },
          ],
        "Roles":
          [
            { "Dependencies": [], "Id": 2, "Name": "l-000-base", "Variables": {} },
            {
              "Dependencies": [],
              "Id": 3,
              "Name": "dc-p16",
              "Variables":
                { "DC": { "Value": "P16", "TypeCode": "S", "Sensitive": false } },
            },
            {
              "Dependencies": [],
              "Id": 4,
              "Name": "dc-dcs",
              "Variables":
                { "DC": { "Value": "DCS", "TypeCode": "S", "Sensitive": false } },
            },
            { "Dependencies": [], "Id": 6, "Name": "w-000-base", "Variables": {} },
          ],
      }
      
      posted in Support
      P
      philippe.camelio_3885
    • RE: OT/BM Configure linux server connection with implicit sudo

      Thanks 😊

      posted in Support
      P
      philippe.camelio_3885
    • Sync BM from OT

      Hello,
      I testing the last version of BM and OT (both on docker).
      I configured sync between OT and BM and I have this error message:

      Response body from "https://otter-2023.ocapiat.fr/api/infrastructure/all/list" could not be loaded as JSON.
      

      while direct request :

      https://otter-2023.ocapiat.fr/api/infrastructure/servers/list?key=*****
      

      return this json

      [{"Active":true,"Environments":[],"Roles":[],"ServerType":"local","HostName":null,"Port":null,"EncryptionType":null,"EncryptionKey":null,"RequireSSL":null,"UniqueId":null,"AllowedIPAddresses":null,"CredentialsType":null,"CredentialsName":null,"Drift":"none","TempPath":null,"WSManUrl":null,"Id":1,"Name":"LOCALHOST","Variables":{}},{"Active":true,"Environments":["deploiement"],"Roles":["l-000-base","dc-dcs"],"ServerType":"ssh","HostName":"TEST","Port":22,"EncryptionType":null,"EncryptionKey":null,"RequireSSL":null,"UniqueId":null,"AllowedIPAddresses":null,"CredentialsType":null,"CredentialsName":"ubuntu_test_20.04","Drift":"none","TempPath":"/tmp/otter2023","WSManUrl":null,"Id":1002,"Name":"VM004001","Variables":{}}]
      

      Any idea ?

      OT Version 2022.10 (Build 1)
      BM Version 2022.9 (Build 5)

      Best regards
      PhilippeC.

      posted in Support otter buildmaster
      P
      philippe.camelio_3885
    • RE: OT/BM Configure linux server connection with implicit sudo

      Hi @atripp
      it is not for bash script, but when using otter functions:
      Example:
      This will not work a "normal" user.

      Ensure-File /etc/netplan/50-cloud-init.yaml
      (
          Exists: false
      );
      

      I know this can be overcome with bash script, but it would nice to have checkbox "sudo" in otter function.

      I might be the only person who wants this 😕

      Best regards
      Philippe

      posted in Support
      P
      philippe.camelio_3885
    • 1 / 1