What Are ARM Templates (for Azure)?

Question
What are ARM (Azure Resource Manager) templates?

Answer
ARM templates are JSON files that have six element definitions, of which three are mandatory:

$schema
contentVersion
parameters
variables
resources
outputs

The elements $schema, contentversion, and resources are mandatory.

For more information see these links:
https://medium.com/@zaab_it/azure-resource-manager-template-101-1ccddc797f65

How Do You Create an AWS User with Web Console Access to View EKS Clusters in the AWS Console?

One of the following problem scenarios apply.

Problem scenario #1
You want an AWS user to be able to log into the web console and view EKS clusters.  How do you do this?

OR

Problem scenario #2
You are using AWS and when you log into the AWS Console via a web browser with a user who is a member of a Group with two EKS policies,

How Do You Troubleshoot the AWS CLI Error “Traceback … import pkg_resources”?

Problem scenario
You run an “aws” command but you receive an error message such as this:

Traceback (most recent call last):
  File “/usr/bin/aws”, line 4, in <module>
    import pkg_resources
  File “/usr/lib/python2.7/site-packages/pkg_resources.py”, line 3007, in <module>

What should you do?

Solution
1.  Install pip.  If you need assistance, see this posting (especially the “Problem scenario” paragraph with hyperlinks based on distribution families of Linux).

How Do You Use GCP’s App Engine?

Problem scenario
You want to leverage GCP’s serverless App Engine component with its scalability.  What do you do?

Solution
1.  Go to the cloud shell.  In the web UI of GCP in the upper righthand corner go to the icon that looks like this: “>_” and click on it.  From cloud shell run these commands:

git clone https://github.com/GoogleCloudPlatform/python-docs-samples

cd python-docs-samples/appengine/standard_python37/hello_world

virtualenv –python python3 ~/envs/hello_world

source ~/envs/hello_world/bin/activate

pip install -r requirements.txt

python main.py

2. 

How Do You Troubleshoot the Ansible Error “Syntax Error while loading YAML expected <block end>, but found ‘-‘”?

Problem scenario
You are trying to run an Ansible playbook with the “become: yes” stanza.  You get this error after your ansible-playbook command:

“ERROR! Syntax Error while loading YAML.
  expected <block end>, but found ‘-‘

The error appears to have been in ‘/home/cooluser/good.yaml’: line 4, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

 

How Do You Use an .sls File to Push down Configuration Changes Using SaltStack?

Problem scenario
You want to leverage the CM tool SaltStack.  You have Salt Master installed, and now you want to push down files to Salt Minion client servers.  How do you do this?

Solution
Prerequisites

This solution requires Salt Master to be configured.  If you need assistance, see this posting.

Procedures
1. 

What Is The Difference between a Kubernetes Service, the Kubelet, and the Kubernetes API?

Question
You know of different Kubernetes components: the Kubernetes Service, the Kubelet, and the Kubernetes API.  What do these components do and how are they different?

Answer
A Kubernetes service is an entity, that may span nodes, that keeps a group of Pods functional and coherent (paraphrased from this site).  A “[s]ervice will get its own IP address and port” as quoted from page 339 of Kubernetes in Action

How Do You Troubleshoot the Ansible Problem “ERROR! Syntax Error while loading YAML. mapping values are not allowed here”?

Problem scenario
You are trying to run an Ansible playbook with the “become: yes” stanza.  You get this error after your ansible-playbook command:

“ERROR! Syntax Error while loading YAML.
  mapping values are not allowed here

The error appears to have been in ‘/home/cooluser/good.yaml’: line 5, column 10, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be…”

What should you do?

How Do You Troubleshoot the Ansible Message “ERROR! the role was not found”?

Problem scenario
You run ansible-playbook on a playbook (e.g., .yaml file) that uses a role.  It fails with the message “ERROR! the role was not found”.  How do you correct this problem?

Solution
Find the ansible.cfg file.  Look at the roles_path stanza.  Add or modify the path that you want Ansible to look at for a role every time the Ansible playbook runs.

How Do You Write an Ansible Playbook to Transfer a Compressed File and Unzip It without Using Linux Utilities?

Problem scenario
You have installed Ansible and configured it to work with other servers (managed nodes).  You want to write an Ansible playbook that will work with Linux managed nodes with three requirements:

1.  Transfer a compressed file from a web sever without wget.
2.  Uncompress a .zip file without unzip.
3.  Work without passwordless SSH authentication to the managed nodes.

How do you accomplish this with using Ansible-supported features?