When you test your Chef cookbook in Test Kitchen you may get the following warning:
warning: Insecure world writable dir MY_DIRECTORY/PATH in PATH, mode 040777
To stop this warning message, execute
chmod 755 MY_DIRECTORY/PATH
Knowledge Base for IT Professionals, Teachers and Astronauts
When you test your Chef cookbook in Test Kitchen you may get the following warning:
warning: Insecure world writable dir MY_DIRECTORY/PATH in PATH, mode 040777
To stop this warning message, execute
chmod 755 MY_DIRECTORY/PATH
On some lean systems, mostly in Docker containers, some important commands are not readily available. The table below shows the command to install them.
To get the name of the Linux distribution execute
cat /etc/os-release
To find the package that contains the command, install apt-file
sudo apt-get install apt-file
Update the file package mapping database
sudo apt-file update
Search for the command at the end of the path
apt-file search --regexp '/MY_COMMAND$'
Select the package that contains the command in the standard path (/usr/bin/)
To get more information on the package
apt-cache show MY_PACKAGE
Application | RHEL, CentOS | Ubuntu, Debian |
free, kill, pkill, pgrep, pmap, ps, pwdx, skill, slabtop, snice, sysctl, tload, top, uptime, vmstat, w, watch | apt-get install procps | |
telnet | yum install telnet -y | apt-get install telnet |
If you really know one programming language, you can learn others too. The most important part is to understand the concept of computer programming. All languages are built on similar type of instructions, some of them require a semicolon at the end of the line, others don’t. Some of them use curly braces {} to group instructions, others use indentation.
All of them allow you to make decisions, usually with the keyword IF, assign values to variables with =, read the keyboard, write to the screen, read and write the disk, and the network. Loop through items with FOR, FOREACH, and WHILE, address array elements with [0..]. You only have to learn a few English words and the syntax to use them.
The internet, and especially Stack Overflow is a great resource to find sample code that does what you need. Avoid assembling your program by copy pasting code from the internet. Try to understand the examples, and write your own lines to be able to really understand and maintain it.
The list below shows the advancement of personal computer technology. I have added the usual hardware specifications, the most popular operating systems, and important programming languages. The dates are not when the technology was announced, but when the average user started to use it.
IBM Mainframe, magnetic tape and large format magnetic disk storage
Homemade personal computer with no permanent storage
“Midrange” computer (16 KB solid state or magnetic-core RAM, large format magnetic disk storage )
ZX 81 (3.25 MHz processor, first 1 KB, later 16 KB RAM, compact audio cassette storage)
ZX Spectrum (3.5 MHz processor, 16 KB RAM, compact audio cassette storage)
Commodore 64 (1 MHz processor, 64 KB RAM, 5.4″ floppy disk)
IBM PC( 4.7 MHz processor, first 128 KB, later 256 KB RAM, 5.4″ floppy disk, later 10 or 20 MB 5.4″ hard drive)
DOS
IBM XT ( 4.7-12 MHz processor, 16 MB RAM)
DOS
IBM 386 ( 40 MHz processor, 256 MB RAM)
DOS, Windows 3.1
IBM clone( 40 MHz processor, 256 MB RAM)
Windows 95
IBM clone ( 150 MHz processor, 512 MB RAM)
Windows 98, Windows ME, Windows 2000
Linux Debian
( 1 GHz processor, first 1 GB, later 4 GB RAM)
Windows Server 2003
( 1 GHz processor, first 4 G, later 32 GB RAM)
Windows Server 2008
Windows 7 laptop (2 GHz processor, 6 GB RAM, 500 GB HD)
Windows Server 2012 R2 virtual machines in the cloud ( 2 GHz processor, 4 – 32 GB RAM)
Linux RedHat 7 ( virtual machines in the cloud 2 GHz processor, 4 – 32 GB RAM)
MacBook Pro laptop (2.5 GHz i7 processor, 16 GB RAM, 1TB SSD storage)
MacBook Pro (5 GHz i9 processor, 32 GB RAM, 1TB SSD storage)
Modern computers don’t have DVD drives anymore. To install Windows on a new system you need to place the Windows installation media on a bootable USB drive. To prepare the bootable USB drive you need a working computer with Windows.
EXEC sp_grantlogin 'BUILTIN\Administrators'
EXEC sp_addsrvrolemember 'BUILTIN\Administrators','sysadmin'
EXEC master..xp_logininfo
@acctname = 'Builtin\Administrators',
@option = 'members' -- show group members
To view the final configuration values of the docker-config.yml file after reading the environment variables from .env file, and all variable substitutions are done
docker-compose config
With Portainer we can monitor multiple Docker Swarms from one Portainer Server. To connect an existing Portainer server to an agent
environment:
# REQUIRED: Should be equal to the service name prefixed by "tasks." when
# deployed inside an overlay network
AGENT_CLUSTER_ADDR: tasks.agent
# AGENT_PORT: 9001
# LOG_LEVEL: debug
AGENT_SECRET: my_secret_token
ports:
- target: 9001
published: 9001
protocol: tcp
mode: host
environment:
AGENT_SECRET: my_secret_token
When the Portainer server starts, waits 5 minutes for a user to create the admin account. If no account created in the first 5 minutes, the server stops with error code 1, message:
No administrator account was created after 5 min. Shutting down the Portainer instance for security reasons.
To keep the Portainer server running, with your web browser navigate to the web UI on port 9000 and enter a password for the admin account.
The first step of the Chef Test Kitchen converge operation is to transfer the cookbooks to the instance. If any of the cookbooks contain large files, the operation can take minutes while the terminal displays the message
Transferring files to < … >