Apache Software Foundation Has Imperfect Websites

"Documentation plays a great role in the maintenance of a project."  (Page 19, Learn Apache Ant, Tutorialspoint.com, 2014) 

The open source movement is no exception.  As much as we admire The Apache Software Foundation, we are disappointed that they don't correct errors. We've submitted the first two errors below to them.  However, mistakes remain. Here are some errors to help other people who may be confused:

#1 was corrected.  (We removed the error from this page.)

#2 Error on web page for Apache Ant
Specific location: http://ant.apache.org/projects.html
What is wrong:  There are five broken links on this page.
The links to Antiplate, BuildMonkey, Leafcutter*, JAM - JavaGen Ant Modules, Savant are all broken.

* You have to confirm a security exception.  Professionals may not be allowed to do this from a corporate network.

#3  Error on web page for Apache Ant
Specific location: https://ant.apache.org/external.html
What is wrong:  The "Jrun Ant Tasks" link (http://www.adobe.com/products/jrun/) redirects to ColdFusion. The "Surround SCM" link is broken.

#4  Web page on Apache Ant
Specific location: http://ant.apache.org/antnews.html
Content: "Best-Practices Profile of Apache Ant at Sun's Dot-Com Builder
Sun has released an introductory article on Apache Ant on their Dot-Com Builder site on May 30 2001. See http://dcb.sun.com/practices/profiles/ant.jsp"
What is wrong:  The web page redirects to a generic Oracle web page.

#5 was corrected.

This post was last updated on January 1, 2018.

As of 9/2/16 there were two other problems.  We will post them below for posterity. 
#1 Error on web page for Apache Tomcat
Specific location: https://tomcat.apache.org/connectors-doc/webserver_howto/apache.html
Content: "Warning:  If Apache HTTP Server and Tomcat are configured to serve content from the same filing system location then care must be taken to ensure that httpd is not able to serve inappropriate content such as the contents of the WEB-INF directory or JSP source code."
What was wrong:  Filing system?  It is now fixed.

#5  Web page on Apache Maven
Specific location: https://maven.apache.org/repository-management.html used to have a broken link.
Content: Sonatype Nexus OSS (open source)
What was wrong:  There was a link that did not work.  It is now fixed.

What To Do When Linux Files Are Read Only

Sometimes you cannot edit and save a single file in Linux.  For example, if you boot into maintenance mode after the /etc/fstab is corrupt, you cannot edit the very file that is causing the problem.  To overcome this problem, you will need to log in as root and issue a command.  You will need to manually edit the /etc/fstab.  To do this in maintenance mode you need to issue this command from the prompt: 
mount -o remount,rw /
After this, you will be able to edit the /etc/fstab file.  Hopefully you will know what is wrong or you have a backup.  Be careful when running scripts that automatically update this file.  If the scripts haven't been tested or cannot handle exceptions, the /etc/fstab can be modified in unusual ways.

Top Five Reasons To Ask For Help When Working in I.T.

"If you learn nothing else from training, it is very important to learn that your limits are seldom where you think they are." (Page 94 of Starting Strength.)

When challenged at work, be it debugging a program or getting a server or pod to work properly, sometimes it makes sense to escalate the problem or ask for assistance.  This is true for lead architects, I.T. vendors, or junior service desk employees.  In 2018 an article was published entitled Great Leaders Know When to Ask for Help and How to Do It. Here are the top five reasons to ask for assistance.

1)  It can save time.  A senior level person may not have the idiosyncratic business knowledge of a more tenured junior employee.  Often I.T. problems involve specific business procedures.  Multiple services may depend on the resolution of a problem. Collaboration can raise morale.

2)  It can save money.  High hourly rates of employees can cause a business to lose a great deal of money.  Getting help can prevent the productivity loss of hundreds of dollars in just a few minutes.

3)  The key to problem solving is using a non-habitual mode of thought.  A different person can be key to this.  Sometimes a different person can recommend a habitual course of action that was inadvertently overlooked.  No one is perfect.

4)  It can avoid the need for meetings.  Pro forma meetings can bore many participants.  With many other people present, individuals may feel anxiety preventing them from being productive or thoughtful.  Occasional ad hoc collaboration (in the course of escalation of a problem) can create an opportunity to communicate ancillary needs and thus obviate the need of a meeting.

5)  The Pygmalion Effect can cause a junior person to become momentarily valuable beyond her normal pay grade.  The more junior employee may not have the answer but may be able to do investigation and want to prove her worth.  It is advisable to ask questions too.  An OpenStack book says this about networking troubleshooting:  '[D]on't forget that sometimes an extra pair of eyes goes a long way to assist.'  The quote was taken from page 155 of OpenStack Operations Guide (written by Fifield, Fleming, Gentle, Hochstein, Proulx, Toews and Topjian).

Conclusion
Before asking questions, it is wise to be diligent.   Do a search in a knowledge base if you have been provided one.  Sometimes a man page in Linux or a Google search can help.  Ideally get a good night's sleep before work and plan ahead (so you can focus without being distracted).  Ongoing self-study can help you know where to find the answers (or know the answers themselves).  Every business unit is different.  Sometimes managers can set guidelines for when to ask questions clearly and how much time you should take when answering such questions from others.  No one likes spinning their wheels with pressure to be productive and appear competent with a difficult problem.  So when someone asks you for help, remember that they may be in a predicament.  Be nice and good luck avoiding stressful situations.


For further reading, see the following:

Python Documentation Issue

Python is a great language. 

On 11/10/15 we found an error on this Python documentation site.  Here is what we saw for the endswith function documentation:

The Syntax for the "endswith" function, on the face of the documentation, involves "startswith".  We updated the site by clicking the "Edit on GitHub" link.  We corrected it on 11/10/15.  Hopefully someone will approve this change and the canonical syntax in the documentation will be corrected.

OpenStack and Virtualization API Quiz

1.  Generic API Question
What are the HTTP operations associated with the acronym CRUD?

2.  OpenStack API Question
Assuming a verbose amount of logging has been preconfigured, does the API log for glance ordinarily capture glance activity from the CLI (commands that bypass horizon)?  As a hint, the default location of this log is this:  /var/log/glance/api.log

3.  OpenStack API Question
The "Create Image" feature in Horizon is an API call with an underlying "Post" call.  Assuming a verbose amount of logging has been preconfigured, when a user clicks the "Create Image" button, will the underlying Post activity be captured in the /var/log/apache2/horizon_access.log ?

4.  OpenStack API Question
How is neutron different from nova-network?

5.  OpenStack API Question
Are OpenStack APIs for Swift most commonly written in the Swift programming languages?

6.  VMware API Question
vRealize Orchestrator APIs cover what percentage of vSphere APIs?

7.  VMware API Question
vRealize Orchestrator APIs cover what percentage of VMware vCloud Director APIs?

8.  VMware API Question
What is vAPI?

9.  Generic OpenStack Question
When someone on an OpenStack API conference call refers to a word that is pronounced "moss" what might she be referring to?

10.  Generic Virtualization Question
What is virtualization on virtualization called (when a guest virtual machine's host is a virtual server itself)?

11.  OpenStack API Question
Which of the following three are the most common types of request and response parameters involved with OpenStack APIs?

a) XSD Lists
b) XSD Strings
c) XSD Dicts
d) JSON strings
e) JSON integers
f) Python strings
g) Python integers

12.  API Virtualization Question
Which AWS tool primarily functions to monitor and record API activity in a given AWS account?

a) Amazon CloudWatch
b) Amazon CloudFormation
c) Amazon CloudTrail
d) Amazon AppStream

13.  Generic API Question
Django's REST framework includes API requests with responses that are only in unbrowsable JSON?
True
False

14.  OpenStack API Question
Does the OpenStack API include the Patch HTTP request?
​Yes
No

15.  AWS API Question
Can AWS Gateway API endpoints (URLs) be isolated within a Virtual Private Cloud and hidden from the Internet?
Yes
No

16.  General API Question
Is service virtualization not useful during development yet useful in production?
Yes
No

17.  AWS API Question
When automating AWS operations with the AWS API Gateway, as with AWS SDKs and the AWS CLI, there is no need to sign the request?
True
False

18.  AWS API Question
For AWS, what is the difference between a t2 instance and a t1 instance?

a.  t1 instances are more compute optimized
b.  t2 instances are more compute optimized
c.  t1 instances are "previous generation instances"
d.  t2 instances are "previous generation instances"

19.   General REST API Question
What is the name of the project to standardize REST APIs?

a.  The Swagger Specification
b.  The OpenAPI Initiative
c.  The Reverb Initiative
d.  The Wordnik Initiative
e.  The REST Model

20.  General REST API Question
What technology supports XML and JSON for Restful APIs that has the initials "HAL"?

a.  Hypertext Application Language
b.  Hypermedia Application Language
c.  Hardware Abstraction Layer
d.  Hybrid Automation Layer

21.  General REST API Question
There are three levels of RESTful web services.  Which level is concerned with self-documentation, verbs, and resources?

Level 1 is concerned with ______________?
Level 2 is concerned with ______________?
Level 3 is concerned with ______________?

22.  Virtualization API Question
What is the virtualization API tool that supports the LXC Linux container system, the Xen hypervisor on Linux servers, and the KVM/QEMU Linux hypervisor?

a.  cffi
b.  Bhyve
c.  oVirt
d.  libvirt

23.  General Virtualization Question
Which of the following is a tool that provides centralized management for virtual servers?

a.  XPCOM
b.  Bhyve
c.  oVirt
d.  CORBA
e.  Requests

24.  General Virtualization Question
virsh is part of which tool?

a.  XPCOM
b.  Bhyve
c.  oVirt
d.  CORBA
e.  libvirt

25.  What does the term REST stand for?

________________________________________________

26.  General Restful API Question
What is an HTTP library for Python?

a.  XPCOM
b.  Bhyve
c.  oVirt
d.  CORBA
e.  Requests

27. General Virtualization Question
What does BaaS stand for?

a. Backend-as-a-Service
b. Balancer-as-a-Service
c. Box-as-a-Service
d. Bytes-as-a-Service

28. Generic REST API Question
REST APIs support direct bilateral communication. Is this true or false?

*** FIND ANSWERS HERE ***

Definition of a Java Thread

Java source code is compiled into bytecode.  Bytecode, when run, is executed by the processor.  Sequences of bytecode go through processors, and on occasion these sequences must be analyzed for developing new Java software.  Java Enterprise Edition (the programming language of choice for many businesses) is owned by Oracle.  However, Oracle is not always the best creator or custodian of documentation for Java.  Here is an example (as of November 2015) taken from Oracle’s website: “A thread is a thread of execution in a program."  This circular definition does little to help elucidate what a thread is.  Techopedia has a more meaningful definition for someone who doesn’t know what a Java thread is: “A thread, in the context of Java, is the path followed when executing a program."   This is not a directory path for an instruction set but a path through a processor for an instruction set.  An instruction set is a sequence of atomic commands.  These commands manipulate data through the processor.  The processor stores the data in its registers in the CPU.

According to page 1269 of A Practical Guide to Fedora and Red Hat Enterprise Linux, the term "thread-safe" is another term for "reentrant." This is "[c]ode that can have multiple simultaneous, interleaved, or nested invocations that do not interfere with one another." So non-interference is a key principle. To learn more about threads as opposed to processes, see this Python posting.

Every thread in Java is created and controlled by a unique object of the java.lang.Thread class. When a standalone application is run, a user thread is automatically created to execute the main() method. This thread is called the main thread. In Java, we can implement threads in one of two ways: - By implementing the java.ang.Runnable interface. - By extending the java.lang.Thread class.

The above quote was taken from page 174 of Cracking the Coding Interview.

We find this definition of a thread to be excellent, that was taken from this StackOverflow.com posting.:

'A thread is an independent set of values for the processor registers (for a single core). Since this includes the Instruction Pointer (aka Program Counter), it controls what executes in what order. It also includes the Stack Pointer, which had better point to a unique area of memory for each thread or else they will interfere with each other.

Threads are the software unit affected by control flow (function call, loop, goto), because those instructions operate on the Instruction Pointer, and that belongs to a particular thread. Threads are often scheduled according to some prioritization scheme (although it's possible to design a system with one thread per processor core, in which case every thread is always running and no scheduling is needed).

In fact the value of the Instruction Pointer and the instruction stored at that location is sufficient to determine a new value for the Instruction Pointer. For most instructions, this simply advances the IP by the size of the instruction, but control flow instructions change the IP in other, predictable ways. The sequence of values the IP takes on forms a path of execution weaving through the program code, giving rise to the name "thread".' 

        Once you know what a thread is, you can comprehend Java’s multithreading capabilities.  Java can facilitate the concurrent execution of different processes.  When these processes consume or edit shared resources, unexpected problems can occur.  To prevent these potential problems, the synchronized keyword in a Java program (the source code) can be used.  It is helpful for coordinating multithreaded applications.  This way when more than one thread is active, data stored in registers is not modified by different threads.

If a Java program is thread-safe, it may have simultaneous parts that operate on shared data but the program will not cause corruption because the different threads will not be in conflict when the program runs (concepts taken from another StackOverflow.com posting).

To learn more about Java thread dumps, see this posting.

To learn more about a thread, see these external postings:

https://www.wideskills.com/java-tutorial/java-threads-tutorial
https://www.javaworld.com/article/2074217/java-101--understanding-java-threads--part-1--introducing-threads-and-runnables.html
https://www.geeksforgeeks.org/multithreading-in-java/
https://www.quora.com/What-is-thread-in-java

Configuration Management Tools (Continually Comparing and Contrasting Technical Aspects of The Big Four)

There are many different configuration management tools.  These programs promote the management of servers either through the release of code or through the deployment of infrastructure patches.  They can do more than that. Commonly their utilization facilitates the transfer of files as well as the modification of existing files.  Four of these configuration management (CM) tools that are very popular among modern enterprises include Puppet, Chef, Ansible, and SaltStack.  This post will briefly compare and contrast some aspects of the tools themselves.
Each application has a file that governs an operation of the CM tool.  A basic operation would be to transfer a file to a server.  A more complex operation would be to ensure certain conditions are met (certain files exist in certain locations).  CM tools can do other things like mount file systems or change file permissions.  Generically we will refer to the files that govern basic operations as template files.

CM tool                         Template file to govern a CM operation                Extension of such a template file
Ansible                                             playbook                                                                                .yml
Chef                                                  recipe                                                                                      .rb
Puppet                                             manifest                                                                                 .pp
SaltStack                                          state file                                                                                 .sls

 The language the above template files are written in are as follows:
CM Tool                    Language
Ansible                      YAML
Chef                           Recipe Domain Specific Language
Puppet                      Puppet Domain Specific Language
SaltStack                   YAML

CM Tool                    Name of main, central server                         Name of servers that are configured
Ansible                      Control server                                                   Managed node
Chef                           Chef server                                                        Chef client
Puppet                      Puppet Master                                                  Puppet Agent
SaltStack                   Master server                                                    Minion

The main file that the main servers use are as follows for each CM tool:
- The Ansible control server uses ansible.cfg.
- Chef Infra Server uses config_rb_server.
- The Puppet Master server uses puppet.conf.
- The Salt Master server uses a master file typically in /etc/salt/.

CM Tool                    Component That Can Store Encrypted Data
Ansible                                                  Ansible vault
Chef                                                       Data bag
Puppet                                                   Hiera           
SaltStack                                                Pillar   

CM Tool       Component to Collect Info* About A Node              

Ansible         Inventory script / Ansible setup module**                                     
Chef             Ohai                                                       
Puppet         Facter and External Node Classifier                                        
SaltStack      Grains                                                              

CM Tool       Test Suites              

Ansible         ansible-lint, Molecule (for Ansible roles)***                                     
Chef             Test Kitchen, ChefSpec                                                        
Puppet         Puppet Playground, RSPEC-PUPPET                                        
SaltStack      Kitchen Salt, miscellaneous others

A weakness of comparing these components is that it seems to equate them in terms of market adoption. For example, we do not think Puppet Playground has been adopted the way Chef Test Kitchen has.

* Information such as the hostname, IP address, operating system etc. of a given client server.

**  "Facts are automatically discovered by Ansible when running plays by executing the internal setup module on the remote nodes. You never have to call the setup module explicitly, it just runs..." taken from http://docs.ansible.com/ansible/glossary.html.

*** To set it up, see this posting. To learn more, see the official site.

Configuration Management Dependency Resolution
Configuration Management promises to resolve dependencies in a systematic way that can be easily repeated on servers throughout your enterprise.  Here is an overview of four CM tools' dependency resolution components:

Chef
Berkshelf is a CLI tool that is part of the Chef development kit.  Berkshelf manages dependencies for Chef cookbook workflows.

Puppet
Puppet manifests with the "require" keyword.  Puppet's DSL has a "require" key word which is an optional designation for a resource declaration.  It allows a "Package" resource to be declared.  Such a package could be something like an Apache web server installation.

Ansible
Ansible roles are reusable packages.  They can be employed as dependencies in Ansible playbooks.  

SaltStack
Salt Package Manager uses pre-written Salt States (desired configurations) to resolve dependencies for ultimate configuration goals.

Use cases will be a big factor in determining which CM tool is best for you. License compatibility may be a consideration. Finally, when selecting a CM tool that your enterprise will use, the learning curve of your employees will also be a consideration.  The current institutional expertise related technologies may be a factor when determining a CM tool.  Inevitably problems occur, dependencies must be resolved, and customization of the CM tool may be a luxury or necessity.  Therefore the language the tool was written in may influence the decision makers when selecting this crucial tool for your business to adopt and leverage.

CM Tool                                  Language the tool was written in
Ansible                                       Python
Chef                                            Ruby (early versions of Chef) and Erlang (newer versions of Chef)
Puppet                                       Ruby
SaltStack                                    Python

n.b. Please note the following:
What is the benefit of comparing and contrasting the "big four" configuration management tools and their components? Businesses are not sure which to use.

What is a disadvantage of comparing and contrasting these CM tools? They are not analogous in how they work. Despite Puppet and Chef having a common origin, they are very different in how they work.

Links
If you want to try out these CM tools, see the following postings on how to deploy each one (installation and configuration directions):

Ansible for RHEL
Ansible for SUSE
Chef
Puppet for RHEL
Puppet for SUSE
Puppet for Ubuntu
SaltStack

Maybe this isn't an Ansible question for a Chef Puppet, does he have any Salt?