SQL Server is presumed to be installed and SQL Authentication enabled. The database users must use SQL Authentication. Windows Authentication is not supported. (Almost everything works with Windows Authentication. It is only when Git Deploy Hub is running that Windows Authentication cannot be used because it uses a system account)

  1. Install 64-bit git from here. It will automatically download 64-bit if you are on a 64-bit machine. Choose SSH security NOT Putty. If you don't do this, 32-bit git, when run through ASP.NET, attempts to get the SSH key from C:\Windows\SysWOW64\config\systemprofile\.ssh\id_rsa, which fails with insufficient permission.

  2. Install Git Extensions from here. Choose SSH security NOT Putty.

  3. Choose the SSH Key for private repositories.

    For a public GitHub repository, this step is not required.

    The target system only requires read access to the central git repository. A key is only required if your central git repository is private.

    1. You may use a pre-existing SSH key that your organization uses for read access to private repositories. Do not use an SSH key which has modification permissions to any git repository anywhere. Make sure the name of the file is changed to id_rsa.

      or

    2. You can generate the SSH Key
      Git is installed with a utility to generate SSH keys. You will find it in this directory:
      %GIT_INSTALL_ROOT%\usr\bin\ssh-keygen.exe
      For example, using the default install location:
      "c:\program files\git\usr\bin\ssh-keygen.exe"

    3. Create the key in the default location with the default file name, so just click Enter for each prompt.
      Two files will be created:
      c:\users\<username>\.ssh\id_rsa and c:\users\<username>\.ssh\id_rsa.pub

  4. Configure GitHub with the public SSH Key.

    1. Edit the file containing the public SSH Key (for example c:\users\<username>\.ssh\id_rsa.pub) and copy the entire contents to the clipboard. To check that you have the correct file, the contents starts with 'ssh-rsa', 'ssh-ed25519', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', or 'ecdsa-sha2-nistp521'.
    2. Go to your GitHub repository Settings/Deploy Keys and click on Add Deploy Key:



    3. If you get the error "deploy key already in use" you will need to generate a new SSH Key (or use a GitHub team in a corporate account).

    4. Give the Deploy Key an appropriate title and paste the public key into the Key field:

  5. Clone the LANSA cookbook repository into the root of C: drive and switch to the patch/paas branch:

    $ cd \
    $ git clone https://github.com/robe070/cookbooks.git lansa
    $ cd lansa
    $ git checkout -f patch/paas
  6. Pull the latest changes to the LANSA cookbook repository:

    $ cd \lansa
    $ git pull origin
  7. Licensing: A LANSA Scalable License image is automatically licensed. A LANSA Scalable License is present in the LANSA marketplace images published in AWS and Azure. If this is the case then go to step 8. If you are not using one of these images then you will need to install a license manually. Copy x_cpu.exe from an installed LANSA system into this new VM. Run the utility and send the output file to LANSA licensing specifying the licenses you require. See LANSA Windows License for more details.

    To apply the licenses returned to you, use a locally installed LANSA System. It will display a warning that the current system is not compatible with these licenses. Apply the licenses and the messages will inform you of the filename that the licenses have been applied to. Copy this file (*.lic) to the new VM in the C:\Program Files (x86)\Common Files\LANSA directory, or whatever you have called the location of the LANSA shared licenses. And ensure that this registry entry is set up to point to that location:

  8. Main installation:

    Install and Configure IIS, Install WebServer, Install Application (databases are created as required)

    These instructions presume that SQL Server Authentication is being used to connect to the database and the ssh key has already been used to access your git server so that there will not be an authentication prompt when cd %temp% is used by the script:

    $ cd \lansa\scripts
    $ AutomateDeploymentTarget.ps1 -DatabaseServer myserver\instance -DatabaseUser auser -WebUser anotheruser -app1repourl git@github.com:youruser/yourrepo.git -app1branch master

    Note that if the DatabaseServer parameter is not specified, it will default to the default SQL Server instance on the current machine.

    Note that the passwords will be prompted for by the script to keep them secure.

    Refer to the script for a description of the optional parameters and their defaults.

    The database user must exist and be able to create a database.

  9. Give the web user access to the databases.

    Note that a 404 error when accessing a Server Module is most likely to be an issue with database permissions for the web user. Run the Web Utility test to identify the issue.

  10. Test the website is configured correctly using this URL: http://localhost/cgi-bin/lansaweb?about

  11. Test the application works with a URL of this form: http://localhost/app1/dem/my_main.html