SPM Bootstrapping to remote server with arguments

How can I supply remote OS credentials to the following command?

cc exec provisioning bootstrap nodes nodeAlias

The manuals does not include these parameters. If I use an input file, the section

BASIC
PASSWORD


outlines the details. But not with the arguments supplied.

Any suggestions appreciated. To busy to decompile the source.

The errors in wrapper.log when using arguments:
com.softwareag.platform.management.common.exceptions.BadRequestException: Remote machine credentials are not provided.

Hi Hansson,

There’s nice description in CCE documentation
you can access it via Web UI on the machine

http://<CEE_HOST:CCE_PORT>/cce/web/cc-help/index.html#page/cc-onlinehelp%2Fexec_bootstrap_nodes.html%23

Thanks
Nikolay

Thanks for the tip Nikolay, but maybe I am missing the obvious here. The command line arguments do not include the remote OS credentials (i.e. the username and password arguments), - only the input file option does.

And I don’t want to use an input file since that would involve having to create about 50 different files for the various SPM nodes we need to create for the customer. It will be better handled through a single batch script with port numbers and credentials easily defined (once).

Trying with:

.\cc exec provisioning bootstrap nodes TST_UM_03 hostname=remote.server.com repoName=cc-all-9.9-release-w64 version=latest distribution=ALL platform=W64 installDir=C:/SoftwareAG/TST_UM_03 httpPort=8630 httpsPort=8631 userName=hhansson password=manage -u Administrator -p manage

ERROR: 500 Internal Server Error

(The error in wrapper states no credentials passed…)

As you’re on 9.9 the easiest way to bootstrap multiple installations is using spm-layer template

$ cc exec templates composite apply spm-layer environment.type=layer spm.hosts=[host1,host2,host3] os.username=hhansson os.password=manage install.dir=C:\SoftwareAG\TST_UM_03 os.platform=W64 repo.product=cc-all-9.9-release-w64 repo.fix=cc-fix-9.9-fix1 spm.fixes=ALL -u Administrator -p manage

NOTE1: that your remote Windows hosts must have OpenSSH setup and allow user hhansson to login via SSH and have administrative rights on this host.

NOTE2: You can as easily setup UM on a given host by using um-layer.

$ cc exec templates composite apply um-layer environment.type=cluster um.hosts=[host1,host2] os.username=hhansson os.password=manage install.dir=C:\SoftwareAG\TST_UM_03 os.platform=W64 repo.product=webMethods-9.9 repo.fix=Empower um.fixes=ALL -u Administrator -p manage

Notice that you have to provide repo.product and repo.fix that includes UM products and fixes as cc-* repos don’t

You can run the spm-layer first and then um-layer (or any other layer) second or you can run um-layer only. It will bootstrap spms first before performing UM setup.

Thanks Sergei, - I got it. I went down that route earlier but I could never get the node alias to be created as per my own definitions (the node was created based on the server name). For reference, this is the template def’s:

provision:
TST_SPM: #Environment
SPM_01: TST_SPM_01 # Layer and associated hardcoded SPM node (to be created)

nodes:
default: # Default Environment
default: # Default SPM node
secure: false
bootstrapInfo:
installDir: ${install.dir}
repoName: ${repo.spm}
platform: ${os.platform}
distribution: ${spm.distribution}
useImage: ${spm.useImage}
port: ${os.port}
credentials:
userName: ${os.username}
password: ${os.password}
authenticationMethod: ${os.auth.method}

TST_SPM: #Environment
TST_SPM_01: # The new SPM node name and alias
host: remote.server.com
port: 8950

Thanks again!

If you want to have list of SPM’s with specified aliases other than hostnames you have to map them in your custom template using nodes section. This is the only way right now


alias: myspm-layer

environments:
  env1:

layers:
  spm:
     templates: [...]

provision:
  env1:
     spm: [n1,n2,n3]

nodes:
  default:
    default:
       # all default parameters like install dir, repoName, etc....
  env1:
    n1:
       host: host1
    n2:
       host: host2
    n3:
       host: host3

Then execute for env1 environment type


cc exec templates composite myspm-layer environment.type=env1

Thanks for the answer, - it works ok without adding node names explicitly… If I first create the SPM nodes separately (separate composite template), I can then just reference them in the provisioning section when adding product installations:


Bootstrapping the SPM nodes:
provision:
  CIB_B2B_BPMS:
    SPM_LAYER:     CIB_B2B_BPMS_01
  CIB_MED_ESB_UM:
    SPM_LAYER:     CIB_MED_ESB_UM_01
  CIB_MWS_CS_DEP:
    SPM_LAYER:     CIB_MWS_CS_DEP_01

and the bootstrap info:

nodes:
  default:                 # Default Environment
    default:               # Default SPM node
      host: ${spm.hostname}
      port: ${spm.port}
      secure: false
      bootstrapInfo:
        installDir: ${install.dir}
        repoName: ${repo.spm}
        distribution: ${spm.distribution}
        platform: W64
        useImage: true
        port: 22
        credentials:
          userName: ${os.username}
          password: ${os.password}
          authenticationMethod: PASSWORD


To then create the product components within the above nodes:

provision:
  CIB_B2B_BPMS:
    PRODUCT_LAYER:    CIB_B2B_BPMS_01
  CIB_MED_ESB_UM:
    PRODUCT_LAYER:    CIB_MED_ESB_UM_01
  CIB_MWS_CS_DEP:
    PRODUCT_LAYER:    CIB_MWS_CS_DEP_01

nodes:
  default:                 # Default Environment
    default:               # Default SPM node
      host: ${SPM.hostname}
      port: ${SPM.port}
      secure: false

Correct.
The node matching is done based on protocol://host:port (version and installDir)
If pre-registered SPM is already running and listening on the target and matches the target installDir and version, then it will be re-used.