What is Software-Defined Infrastructure?

Question
What is software-defined infrastructure?

Answer
There is no universally accepted definition of software-defined infrastructure (according to Techopedia).

We define it as infrastructure that is provisioned and controlled by software. (There is physical infrastructure that powers or underlies SDI.) The provisioning and configuring of virtual machines is one example of SDI. OpenStack and Ericsson's SDI Manager are other examples of SDI. Sophisticated automation and orchestration is achievable through SDI.

To read more see this postings:
https://www.cio.com/article/3492000/why-software-defined-infrastructure-is-critical-to-your-business-growth.html
https://www.wipro.com/engineeringNXT/software-defined-infrastructure/
https://www.bmc.com/blogs/software-defined-infrastructure/
https://susedefines.suse.com/definition/software-defined-infrastructure/
https://www.techopedia.com/definition/33000/software-defined-infrastructure-sdi

How Do You Get an Android App to Have a Shortcut on the Main Part of the Home Screen?

Problem scenario
Androids have home screens (which are the equivalent of a Windows, Mac or Linux desktop). How do you get an application to be easily accessed from the home screen (rather than needing to search for it and drill down each time)?

Solution

  1. Find a square category of apps (e.g., for Google or Microsoft) on your home screen. (It is in the purple rectangle in the screenshot below.) Click on it.

2. There should be a plus sign "+" near the top. Click on it.
3. You should now be able to see all the applications installed on your phone in alphabetical order. Scroll the the app you want and click on it so there is a check mark near it. Click "Done".
4. Now touch the application shortcut, hold it, and drag it to the top of the home screen. It should now stay here.

How Do You Floss without Hurting Your Fingers?

Problem scenario
You want to floss, but it can hurt your fingers. You do not want to strangle or cut off the blood circulation to your fingers. What should you do to floss without pain?

Possible Solution #1
Floss your teeth the way dental hygienists floss patients' teeth. Use latex or vinyl gloves. (To help with overall visibility as even skin-tight gloves may take up some space, you may want to buy a small magnifying mirror to use while flossing. High-end ones have lights to help illuminate inside your mouth. There are useful affordable ones with a suction cup to place on your bathroom mirror.)

Possible Solution #2
Some people think that the type of floss can make a difference. One source says that stretchy floss can mitigate the problems with your fingers. If you are using a cheap floss, you may want to try something more expensive.

Possible Solution #3
You may want to learn about the technique. Other sources address the strangling aspects of cutting off circulation to your fingers with dental floss. Here are some links:

Possible Solution #4 (a workaround or an adjunct activity, an enhancement/augmenter)
Buy a water flosser. Irrigation is not a substitute for flossing, but if you temporarily cannot floss normally with your fingers/hands, a WaterPik may help. It can also help when you can floss as normal; you may see debris/food particles after each use.


(Disclaimer: This is not medical or dental advice. These are brainstorming ideas. Consult with a doctor or dentist before modifying your personal routine.)

How Do You Quickly Do Some Python Coding?

Problem scenario
You want to test some Python scripting or write a basic program to warm up before a coding interview. You only have access to a Windows machine (e.g., at a hotel "business center"). You cannot install Python on the laptop. How do you do some Python coding?

Solution
As long as you have access to the internet, browse to this site: https://www.onlinegdb.com/

(For a more serious development project, try Heroku.com.)

How Do You Troubleshoot Terraform Commands That Do Not Seem to Use the -var-file= Flag Passed to Them?

Problem scenario
You want to pass the var-file flag in a Terraform command. You have a different configuration/variables file (from the default one) that you want the Terraform command to use. The resulting error indicates that there is insuffient configuration data; the behavior is consistent with no variables files being readable.

How do you get a terraform plan command to look at a different folder location or directory?

Possible Solution #1
Are you in the correct directory when you run the terraform plan command? Are you in a hidden directory? Can you change (cd) to the directory with the .tfvars file? Can you run terraform init again from this directory?

(This solution was adapted from this devops.stackexchange.com posting.)


Possible Solution #2
What are the files of the .tfvars file? Can you run ls -lh foobar.tfvars? Perhaps the file is not readable for the user running the Terraform command.

How Do You Install Windows DSC on Windows Server 2019?

Problem scenario
You are running Windows Server 2019. You want to install Windows DSC. What do you do?

Solution

  1. Open PowerShell.
  2. Run this command: Install-Module 'PSDscResources' -Verbose
  3. When prompted with this question "NuGet provider is required to continue…", choose "Yes".
  4. If you believe your Windows Server is in a secure environment, or you have no goals putting sensitive data on your Windows server, when prompted about an "Untrusted repository", specifically "Are you sure you want to install the modules from 'PSGallery'?", choose "Yes".

How Do You Secure or Harden a Linux Server?

Problem scenario
You need to make a Linux server very secure. How do you harden a Linux server?

Answer

  1. You may need to reformat the server. Backup the data. When you reinstall Linux use full disk encryption. Make the boot partition read-only.
  2. Enforce complex passwords that must be changed every 30 to 90 days. Use John the Ripper (www.openwall.com/john) to ensure your passwords are strong.
  3. sshd_config should not "PermitRootLogin"
  4. Don't start Docker containers with sudo. Look into this one: could you remove root from the "docker" group? Or could do you some configuration to prevent "sudo" or the root user from starting Docker containers?
  5. Use microservices architecture to the extent possible. If a single-purpose container or single-purpose VM is a compromised, you retain integrity of other services and data. From a pragmatic perspective, the data may not be useful to the hacker of a single container or VM. If you are using Docker, see this posting.
  6. Keep the Linux kernel up-to-date.
  7. Use AppArmor or SELinux.
  8. Have back-ups. Security involves the Confidentiality, Integrity and Availability triad. Therefore having back-ups that you have tested with restoring are essential to hardening a Linux server.
  9. Use a host-based IDS (Intrusion Detection System).
  10. Have an network-based IDS (Intrusion Detection System).
  11. Have a firewall on the OS.
  12. Discover noowner files from time-to-time:

Noowner Files
Files not owned by any user or group can pose a security problem. Just find them with the following command which do not belong to a valid user and a valid group
find /dir -xdev ( -nouser -o -nogroup ) -print
You need to investigate each reported file and either assign it to an appropriate user and group or remove it.

https://www.cyberciti.biz/tips/linux-security.html (#26)

13. Use TCPWrappers

"… TCPWrappers a host-based networking ACL system to filter network access to Internet. " (This excerpt was taken from https://www.cyberciti.biz/tips/linux-security.html.)

tcpwrappers are probably not necessary for a modern version of RHEL. But for Ubuntu they seem to be used according to this site.

14. Check the configuration of /etc/sysctl.conf. This important file sets kernel parameters. To ensure it is secure, see this website https://www.cyberciti.biz/faq/linux-kernel-etcsysctl-conf-security-hardening/.

15. Restrict the core dumps via their governing configurations. (This was influenced by #15 of this external page.) To do this, see these postings:

16. Change the permissions settings of cronjob-related files. To do this, see #14 of this external page.

17. Install a shredder utility. Deleting sensitive files with this can help ensure confidentiality.

18. You may want to look into a Lojack-type recovery mechanism for the server.

19. You may want to read Bruce Schneier's blog.

How Do You Rotate a List in Python?

Problem Scenario
Rotating a list can make it appear circular (wherein an iteration from the last element brings you to the first element in the list). You do not want to import any modules. You have a list called foobar. You want to keep the content the same, but adjust the index by 1 on each value. How do you rotate a list in Python?

Solution

foobar = foobar[-1:] + foobar[:-1]

Why Is You AquaSana UV Water Filter Leaking?

Problem scenario
You have an ultra-violet water filter from AquaSana. It is leaking water. What should you do?

Possible Solutions
Never have the electrical plug in an outlet when making changes! The UV light could blind you if you look at it when it is on.

Make sure the O-rings on the top and bottom are in good condition. Old rubber will not provide a good seal. They need to be replaced every year or two.

Make sure the quartz sleeve is not cracked. They are delicate and can break/fracture easily and inconspicuously.

Make sure the quartz sleeve's ends stick out an equal amount on each of the two sides of the chrome housing unit; the quartz sleeve is a cylinder. In our experience it must be exactly in the middle of the unit with the same amount sticking out of the unit on each side; if one side has more of the sleeve exposed than the other, a leak may occur.

You may need a new black plastic cap (with a spring) that screws on to the outside of the unit.

Advertisement
Even people who take considerable risk do not drink regular, unfiltered water from the tap. You may want a whole-house water filtration system. You can buy them on Amazon.