How Do You Solve the Login Prompt Message “Cloud-init…modules:final…Datasource”?

Problem scenario #1
You just installed Linux on a new VM. You boot up your Debian distribution of Linux (e.g., running via Oracle VirtualBox). You see at the login prompt, "cloud-init…running modules:config…DataSourceNone…cc_final_message.py[WARNING]: Used fallback datasource". What should you do?

Problem scenario #2
You recently created a new server. When you boot your Debian/Ubuntu/Mint server, it seems to hang with an error message about "cloud-init cc_final_message_py [warning]: used fallback datasource." What should you do?

Possible Solution #1 (preferred)
Run this command:
sudo touch /etc/cloud/cloud-init.disabled

Possible solution #2 (not recommended, workaround)
Run this command: sudo apt -y remove cloud-init
(This is a workaround. You will no longer have cloud-init. In many cases you will be OK without cloud-init).

Is It a Recommended/Best Practice to Have a Code Freeze?

Problem scenario
You want to have a release. You are concerned that if new code changes are made to the main branch of the relevant repository that the upcoming production release will have a problem. You are not sure if you should allow changes to take place or if should you have a code freeze. Is it a best/recommended practice to have a code freeze going into the release weekend?

Answer
Maybe. It is not clear. For the "Yes" code freezes are recommended:

  • The DevOps Handbook (on page 150) refers to a problem associated with allowing code changes to happen right before a production release; the solution ended up being that only emergency situations would allow for a change to the code close to the production release.
  • This external site explains how a code freeze can help during critical ecommerce shopping days. It says "[a] code freeze is the perfect time to test and optimize to drive higher sales."

For the "No" code freezes are not recommended:

For mixed reviews on code freezes, see these postings:

Is It a Best/Recommended Practice to Check Code in Frequently?

Problem scenario
You read that it was usually a best practice to check code in daily or more frequently to the main branch. Is this always true?

Solution
No, it is not always true. It is advisable to check code in regularly, but you cannot always check code in this frequently.

In some situations a developer would be terminated for checking in code daily. Ideally code should be checked in daily or more frequently than this, but we know every job is different. Journalists and researchers make recommendations, but they are not your employer. It is considered a "fundamental practice" to check code in often (according to page 399 of Continuous Delivery).

Earn Interest on Your Crypto

While some people recommend you purchase a wallet, if you do not mind storing your crypto on a third party platform, you could earn interest.

Some of the advertised rates are above 5%. The cryptocurrency is not backed by FDIC. To learn more about how it works, see these postings:


If you want to receive free cryptocurrency by just learning more, try Coinbase; it is ideal for Americans. For Europeans, the platform/company Iconomi.com can allow you to buy crypto or learn more.

How Do You Launch the Amazon Workspaces Client from Your Debian Server?

Problem scenario
You have installed the Amazon Workspaces Client on your Ubuntu or Linux Mint server. You want to start the application from the GUI desktop. What do you do?

Possible solution #1
Run this command: sudo find / -name workspacesclient*

Possible solution #2
Try running this from the terminal:
/opt/workspacesclient/workspacesclient

What Do You Do if the Data Input Does Not Fit in Memory in Computer Programming?

Problem scenario
You have a massive amount of data to process. The amount is too big for the server you have. How do you write a program or algorithm to handle a very large set of data?

Possible Solution #1
Logically divide the memory by writing portions of the data to files. This is called "chunking" the data. Serially/sequentially process batches. Use external sorting with subfiles in parallel with multiple hard disks if the data set is very large.

Possible Solution #2
Try to use the C programming language to allocate memory more efficiently.

Possible Solution #3
Persist the data in a data store such as a SQL or NoSQL solution.

Possible Solution #4
Manipulate the data with encoding so there is symbolic or nested data that represents the original data with a smaller set. Sometimes ordering data can obviate retrieving a payload. Try using deduplication of the data (such as Hadoop and MapReduce jobs).

Possible Solution #5
Refactor the code's logic to use O(1) memory space.

The following sentences are indirectly related to the exact problem. If you can generate values dynamically rather than build up a set of data, this can help. Memoization can help use less memory in general. Breadth-first-searches can use less memory than depth first searches (according to this external site).

Possible Solution #6
Normally memory constraints are dealt with at the software level -- not at the hardware level. One solution could be to add more memory; see this page for more information on how to do this (even if your server is in the public cloud).

Possible Solution #7 (an extension of #1)
If you are using PowerShell and want to write to disk instead of downloading a file to memory first, you can see this posting.

How Do You Find out if UAC is Enabled on Your Windows Computer?

Problem scenario
You are using either Windows Server 2019 or Windows 10. You want to know if UAC is enabled or not. What should you do?

Solution
Open PowerShell. Run this:

If((Get-ItemProperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System).EnableLUA -eq 1) { echo "UAC is enabled"} Else {echo "UAC is NOT enabled"}

Is It Enough to Use Best Practices?

Question
You hear and read about companies that always use best practices. If you use best practices, is your data safe?

Answer
No.

In 2014 many people respected Akamai Technologies, Amazon Web Services, GitHub, Pinterest, Bitbucket, Reddit, SourceForge, Stripe, and Tumblr. Many of these companies are still venerated. Professionals and authoritative I.T. outlets who love best practices undoubtedly would have praised the previously mentioned companies. Yet they were affected by the Heartbleed bug. To learn more about best practices versus recommended practices, see this posting.

How Do You Write a Flask Program to Accept a Parameter in the URL?

Problem scenario
You want to pass a variable via a URL to a Python program. You want to use Flask for this. What do you do?

Solution
Prerequisite

Install Flask. If you need assistance, see this posting if you are using a CentOS/RHEL/Fedora server or this posting if you are using a Debian/Ubuntu server.

Procedures
This is a multi-route Flask program. Integers can be passed when the URL is called like this: curl http://127.0.0.1:5000/ccc/1

# The /ccc/ route below allows for integers to be passed.  The "ccc(var1)" function accepts a variable.

from flask import Flask, Response

app = Flask(__name__)


@app.route("/aaa")
def users():
    return Response("It works! Continually Integrate and Improve!"), 200

@app.route("/bbb")
def index():
    return Response("YYYYYYYYYYYYYYY"), 200

@app.route("/ccc/<int:var1>", strict_slashes=False)
def ccc(var1):
    return Response("the string entered is " + str(var1)), 200

if __name__ == "__main__":
    app.run(debug=True)