10.7.11 Set up the Target system

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.

a.  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.


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

c.  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.

a.  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'.

b.  Go to your GitHub repository Settings/Deploy Keys and click on Add Deploy Key:

c.  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).

d.  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.   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.

8.  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.

9.  Obtain the LANSA License and Install it
Refer here for more information: web
Note that the *LICENSES process is installed in the LANSA program folder as 'WEBSERVR' and choose to store the license in the Shared folder so that all applications have access to the license. The Shared Folder is c:\program files (x86)\Common Files\LANSA.

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