How Do You Install Octopus Deploy server to a Windows 2016 Server?

Problem scenario
You want to install Octuopus Deploy (e.g., with the 45 free trial) to an AWS instance of Windows Server 2016.  How do you do this?

Solution
This is a simple deployment of Octopus Deploy server for testing or evaluation purposes.  Literally any AWS flavor will work as only 512 MB of RAM is needed for Octopus Deploy server to work for minimal evaluation.

1. 

 » Read more..

How Do You Deploy JetBrains TeamCity to an AWS Windows Server 2016?

Problem scenario
You want to deploy TeamCity to an AWS instance running Windows Server 2016.  How do you do this?

Solution
This is a simple deployment of TeamCity server for testing or evaluation purposes. The flavor of server will depend on the way you use TeamCity server.  For a basic deployment, one processor and 1 GB of RAM is sufficient.  This is far from enough CPU and memory for any “real” usage of TeamCity.

 » Read more..

How Do You Run a SQL Query to Identify the Primary Key of a Table in a PostgreSQL Database?

Problem scenario
You are using PostgreSQL and currently administering a database you inherited from a different company.  You want to determine the primary key of a given table.  How do you identify the primary key of a table?

Solution
Modify the query below so you replace “contint” with the name of the table you are interested in.  The result of this SQL query will be the primary key of that table.

 » Read more..

How Do You Create a Primary Key in a PostgreSQL Table That Already Exists?

Problem scenario
You have a table that you would like to have a primary key.  You would like to add a new column to be the primary key.  How do you do this?

Solution
Here is a SQL command that is an illustration.  Assuming the table’s name is “contint” and the new column you want to add is “continual_col” with a value type of integer, issue this command:

ALTER TABLE ADD COLUMN continual_col int PRIMARY KEY;

 » Read more..

How Do You Troubleshoot the Ansible Message ‘Error while linking: [Errno 2] No such file or directory … “state”: “absent”‘?

Problem scenario
You are using the file module in Ansible.  But you get the error ‘Error while linking: [Errno 2] No such file or directory … “state”: “absent”‘.

What should you do?

Solution
Some people get this problem with different versions of Ansible 2.x.  It is documented on this external page.

Use the “shell” module and this command:

ln -s /existing/directory/ /new/directory/via/softlink

# Where /existing/directory/ is the path of an existing directory and “/new/directory/via/softlink” is the symbolic link you 

 » Read more..

How Do You Solve This SQL Problem When You Receive the Message “ERROR: Syntax Error at or Near”?

Problem scenario
You are trying to update a SQL table with a SQL statement (using the “UPDATE” keyword).  You keep getting “ERROR:  syntax error at or near” with a reference of the value you are trying to give to a cell in a row in a SQL table.  You verified you have no extra commas, apostrophes, or semicolons in your SQL UPDATE statement.  You verified that the columns exist in the table and are spelled correctly in your UPDATE statement.

 » Read more..

How Do You Troubleshoot a Car Alarm Remote Control Device (aka Key Fob)?

Problem scenario
Your remote control to the car alarm (aka key fob) is not working reliably.  You need to get into your car or at least disarm the the alarm on-demand.  How do you get the keyless entry device (or the alarm remote control or key fob) to work reliably to it will deactivate or activate the alarm when you need it to happen?

Solution
Possible solution #1
Tighten the screws in the back or the side. 

 » Read more..

How Do You Log into a Windows Server in Google Cloud Platform?

Problem scenario
You created a Windows server in GCP.  How do you obtain credentials and connect to it?

Solution
1.  Make sure the firewalls allow for the connection.  See this posting if you need to change that.

2.  In the GCP console, go to Computer Engine -> VM Instances.  

3.  Go to the VM you want to connect to.  Under the “Connect” column find the small triangle that points downward. 

 » Read more..

How Do You View Failed User Login Attempts to a PostgreSQL Instance?

Problem scenario
You are running a LAPP application on Ubuntu Linux with PostgreSQL version 9.5.  A user has complained that she cannot log into your Postgres database via a LAPP application.  You are not sure if the attempts are even registering of if the user is entering an incorrect username.  How do you look at a log to see a history of unsuccessful attempts at logging into the Postgresql database?

Solution
Examine this file: /var/log/postgresql/postgresql-9.5-main.log

It logs failed Postgres authentication attempts — even if they come from a PHP web page (a web-based UI).

 » Read more..

How Do You Detect the Hard Drive Letter That Your PowerShell Script (.ps1 File) Is Saved On?

Problem scenario
You have a PowerShell script that you want to be able to detect the hard drive letter it resides on.  How can PowerShell detect the hard drive letter that the .ps1 file itself is stored on?

Solution
Use this command: (get-location).drive.name

To get the drive letter to be in a variable named $dl, use this:
$dl = (get-location).drive.name

Now you can use $dl as the drive letter in the PowerShell script.  

 » Read more..