Wednesday, 10 March 2021

Improving My Garden Soil

Introduction

Having recently moved to a new house I was hoping to use a bit of garden next to the garage to grow some vegetables, bringing back the days when we had an allotment. The area had previously had three small trees planted and lots of long coarse grass and a little bit of rhubarb.


Slowly clearing the grass and the rotting tree wood, the ground was hard to dig typical to a clay type soil and over winter the ground retained surface water which led to ice forming. This post is a summary of my investigation into our garden soil quality, what makes up soil and how to improve the drainage.


Skip the ‘what is soil’ section if you just want to see how I fixed the drainage

What is Soil?

Soil is a collection of organic matter, minerals, gas, liquids and organisms which support plant growth, stores water and is a home for organisms such as worms. 


Soil is made up of ‘horizons’ which are layers of soil:


Horizon

Characteristics

O - Organic (Humus)

Typically made up of leaves and dead wood

A - Surface (Top soil)

Minerals mixed with organic matter

B - Subsoil

Mineral rich that have been filtered from other levels (leached)

C - Substratum

Earth’s surface deposit that makes up soil

R - Bedrock

A selection of rock including granite, basalt, quartzite, limestone or sandstone

 

Horizon O is the ‘humus’ layer which is non-living, finely divided matter made from the decomposition of plant and animals. As it continues to decompose it becomes usable by plants for growth. Humus broadly comes in three formations:


·       Mull which is normally in hot and humid grasslands or densely wooded areas. Has lots of worms, insects and is high in alkaline

·       Mor which is acidic doesn’t have many insects and organisms to break down the matter so a compact layer forms below the surface. These are usually in cold and high-altitude regions and have lots of fungi

·       Moder is between mor and mull extremes. There is a greater abundance of insect and their digestion but the humus and decomposition don’t mix well showing a clear separation


Horizons O and A are what makes up most of the soil used in gardening and comes in a variety of types and they each have specific properties:


Soil Type

Properties

Clay

A heavy soil type which high levels of nutrients

Silt

A light and moisture retentive soil which is good for fertility

Sandy

A light, warm and dry soil that is low in nutrients and often acidic

Loam

A mixture of clay, silt and sandy soil

Peat

A soil that contains a high amount of organic matter which retains lots of moisture.

Chalk

Ranges from a light to heavy soil which is high in alkaline because of calcium carbonate and lime in the structure. 

What affects Soil Drainage?


Soils drain at different rates depending on their composition. Clay is thicker so doesn’t drain as quickly and is also impacted by changing temperatures, contracting in the heat and expanding in the cold so a more clay-like soil drains slower than other types.


When soil becomes compacted its drainage becomes worst, with fewer air pockets there is less space for water to drain into leading to water sitting on the surface or near to the surface.


Both clay-like soils and compacted soils can be exacerbated if the lay of the land doesn’t encourage run off. In fields you might see drainage through a field or on the outskirts, in some gardens you might see a French drain but, in most gardens, water run off isn’t as well managed due to flat gardens or small ditches throughout. This leads to water pooling on the surface. 


If soil sits on a slope, rainwater can cause the soil to slowly ‘creep’ downwards. On larger slopes like hills or coasts this might lead to landslides, in the garden it mostly leads to soil degradation.


From a more scientific basis, permeability – ability for water to pass through – of the soil affects the rate of drainage. Sand and gravel see faster water volume reduction than clay. When water sits between soil particles, the pressure – pore pressure – dictates water drainage ‘seepage’. The increased pressure slows down the seepage which is why the change in water volume slows over time.

My Garden Soil

Figure 1 - Before


When we first moved in, there was lots of plastic, clutter and long grass growing in a space next to the garage where we are going to grow some veg and use as a seating area. The first step was to tidy the area up.

Figure 2 - Post Tidy Up


After tidying there were some clear patches in grass, rubble throughout and more importantly three sets of old trees that were rotting in the trunk at ground level which suggests sustained rot from pooling water at the base. To combat this I dug out the stumps.

Figure 3 - Logs Removed


Whilst digging the soil was clumpy, very hard to dig and much wetter than the rainfall warranted. The grass was still patchy and the ground generally uneven.

Figure 4 - After the Log Removal


After a particularly bad downpour and even a little bit of snow, there was a lot of water retention which became clearer after everything was cleared

Figure 5 - Water Retention

Testing Soil Type

Before making any changes to the soil it’s important to check what type of soil is in the garden. This will help to understand how to fix the problems and what might need adding to the soil for the best vegetable growth.


It’s possible to map soil content with the type e.g. clay, sand, silt, loam or somewhere in the middle e.g. sandy loam, silty loam or clay loam. To complete the test:


1.    Get a big jar

2.    Fill with soil from the garden

3.     Remove any big stones and break up the mud

4.     Add a spoon or two of washing up liquid and add water almost to top

5.     Shake thoroughly and wait a week for the soil too settle


6.    The soil will settle into three distinct layers, sand at the bottom, silt in the middle and clay at the top. Above the last distinct line will be some water which might still be a little muddy. Use a ruler to measure the height of each layer and mark the total height. 

7.    Calculate the length of each and the percentage of the jar that is sand, silt and clay. 

Percentage = (length / total length) * 100 

e.g. Silt Layer Percentage = (1.93/7.78) * 100 = 24.8

 

See the below example for the measurements.

Figure 6 - Soil Test Percentages

8.     Add the percentage of the sand and clay into the website below: https://www.nrcs.usda.gov/wps/portal/nrcs/detail/soils/survey/?cid=nrcs142p2_054167


The output given will be a triangle with a plotted point showing the soil type

Soil Test Result


Having completed the test, the results showed that the soil in the garden is a ‘Sandy Loam’ which is a long way off being a ‘Clay Loam’ which is what was expected.

Figure 7 - Soil Test Results

This was a surprise as the soil behaves like clay by being hard to dig and doesn’t drain well. What is even more surprising was that it would need a lot of clay to have moved into the sandy clay loam. 


The soil test results suggest that drainage should have been better, but the garden did meet the elements in the section "What affects Soil Drainage". There was a lot of compaction so not enough air in the soil this in turn means the water loaded heavily on the soil and drainage is impacted by a lack of permeability

Improving Soil Drainage

Having discovered there was a problem with the drainage of the soil, I started to research the best method for improving the soil drainage. 


To improve drainage you might:  

  • Add organic matter (food waster, compost, manure)
  • Create a ditch or run-away for water to follow
  • Reduce compaction and ‘aerate’ the soil 
  • Plant water hungry ferns and bushes to reduce water in the soil


The first task was to dig over the area that was retaining the most water. At the same time the soil was aerated with a fork, plastic and weeds were removed and compost dug into the soil at about 5 – 10cms throughout.

Figure 8 - Dig over and Aerate


It would have been possible to just dig the specific sub sections that were showing water retention however if just sections were dug over and compost added there would have been spots of good drainage amongst a wider garden of compact soil. 


This can lead to water pooling in the holes that have been dug which would exacerbate rather than solve the problem as water would just pool at the bottom of the hole. This can be seen at the edges of the improved soil as the soil gradient, and the non-compacted soil meets the compacted soil.

Figure 9 - Water Retention on the Edges


There were also spots where the soil level sunk, and water gathered at the bottom of the dug over area. This is most likely because the compost and the existing soil were not adequately mixed which means the water passed through the compost and sat on top of the unmixed soil at the bottom.


To fix this, more soil was dug over, more organic matter added to the soil (vegetable peels, potatoes and bread mixed into the soil) and some more compost dug in.

Figure 10 - More Soil Treatment


Finally, raised beds were added as it would reduce the compaction on the vegetable growing spaces and ensure the soil has the correct ingredients for growing and level of the soil which drops slightly at the back edge towards the fence so the water has some run off.

Figure 11 - Completed Dig Over & Raised Bed


The result is that the soil no longer has water pooling, the water retention in the soil has reduced, there is a natural water gutter just in front of the fence and plenty of space to grow some vegetables.

Figure 12 - Final Garden Picture

Conclusion

In this blog post we have looked at the garden before any changes and issues that came with it. This led to some research into what soil is, why it was behaving the way it was and how to test the soil ready for improvement. 


With the soil results there were improvements made to the back soil ready to plant some vegetables. The rest of the soil will need some changes, but that’s something to worry about next year.

Monday, 12 October 2020

Building IBM ACE Bars using Azure DevOps and a Windows Build Server

For the last few months I have been looking at the most appropriate way to build ACE artefacts. This ranges from what makes good practice for ensuring consistency, what allows the best governance procedures to be followed and what is the best way to isolate the build and deploy of the artefacts?

One of the more common pipeline tools that is being used is Azure DevOps and so I've been playing with the mqsicreatebar, mqsiapplybaroverrides and mqsideploy commands in IBM ACEv11. The following are steps I wanted to achieve to get deployable units in ACE:

  • Build a Base BAR file
  • Apply environment specific overrides to the Base BAR to create an environment BAR file
To complete the build process we need to be able to run ACE commands. To do this we could use an external Server but when using a Windows machine there are certain ways these commands might be run. 

The following are some tips on how I completed the steps using Azure DevOps and Windows in my demo building scenario.

Method of Execution

Having decided to produce a script to be run on the Windows machine the first decision was whether to run as a batch script, bash script or PowerShell. 
  • PowerShell is the Azure Cloud preferred method and comes with the PowerShell pipeline
  • Batch files are out of the box, well understood by most and so likely to be easily supported
  • Bash scripts are cross platform, easily portable and possibly better understood than batch scripts
In the end I chose bash because of the portability and ability to move across Cloud and Operating Systems with more ease and increases the number of people who can edit and support the scripts in future.

Running ACE Commands on Bash on Windows

Bash is not currently native to Windows machines and as such you have to run a bash environment on the Windows system. This will usually be Git Bash so to run in the Build pipeline in Azure using the command line task:
“C:\Program files\Git\bin\bash.exe” myscript.sh

 In order to run ACE commands, the ACE profile needs to be setup using the mqsiprofile command. In the Build pipeline in Azure using the command line task, run the following:

“Drive:\InstallPath\server\bin\mqsiprofile” && “C:\Program files\Git\bin\bash.exe” myscript.sh

Check the format of each ACE command 

It's important to check the format of each of the commands in ACE as some of the command are already executable in shell e.g. cmd format and do not need the file path specificying in the bash script, others are in BAT format so need the full path specifying. One example of this and specific to our needs is the mqsiapplybaroverrides command which needs the .bat extension name when being called in the bash script and also needs the full path to the file.

Passing Azure Variables to the Script

Azure variables need to be passed to the script via the command line task. Azure uses the following format to reference existing variables $(myVariable). Variables can be passed in using the Variables tab e.g. appName (to specify which to build) or predefined Azure variables e.g. System.ArtifactsDirectory

Example buildACE.sh $(appName) $(System.ArtifactsDirectory)

#!/bin/bash
appName=$1
buildAddress=$2
mqsicreatebar -data ${appName} -b ${buildAddress}/${appName}_Base.bar -a ${appName} -deployAsSource
drive:/installPath/server/bin/mqsiapplybaroverrides.bat -b ${buildAddress}/${appName}_Base.bar -p ${appName}/dev-overrides.properties -o ${buildAddress}/${appName}_DEV.bar -r

The following example will take the application being built and the build output location (Artifact) as parameters which are used in the bash script. 

As you can see the mqsicreatebar can be ran without specifying a path because we have the mqsiprofile set, but the mqsiapplybaroverrides needs thee full path to the batch file defining.

The output from the above script would be a base bar and a dev bar for the application name supplied in the Azure Build. Further scripting can be implemented to produce BARs for more environments.

Tuesday, 8 September 2020

IBM MQ – AMQ3817E – DRBD Errors

 Recently when rebuilding an MQ Estate, the previous deployment was torn down and a new installation and configuration was deployed to the same physical Virtual Machines. However, when it came to creating the new Queue Manager there was an error thrown.

 

The reason for the rebuild was to upgrade the version to IBM MQv9.2 which includes some changes to the way RDQM pacemaker and drbd kernel modules are installed.

 

Command:

crtmqm -rr p -rt s -rl thisIP -ri otherIP -rn otherHostname -rp port -lla -fs 20 -lp 6 -ls 3 qmname

 

Error:

AMQ3817E: Replicated data subsystem call '/usr/sbin/drbdadm new-resourceqmname 0 --auto-promote=no' failed with return code '20'.Command 'drbdsetup new-resource qmname 0 --auto-promote=no' did not terminate within 5 seconds

AMQ3812E: Failed to create replicated data queue manager configuration.

 

To debug I did the following:

1.     Checked the MQ Error logs

2.     Check there were no outstanding processes that could be blocking the crtmqm command

3.     Check the correct drbd kernel module was installed on the server. (modinfo drbd)

 

There were no errors in the MQ Logs, no processes running for drbd and the correct kernel module was installed. Sufficiently stumped I ran lsmod drbd | grep drbd on the server and compared it to another environment.

 

There was no drbd_transport_tcp module on the output of the environment with the issues only the drbd module. When there are no RDQM Queue Managers running lsmod drbd | grep drbd hould return empty, which seems to suggest the drbd module was hanging. 

 

To resolve this there are two possible actions:

a.     Reboot the machine

b.     Remove the remaining ‘hanging’ drbd module using rmmod drbd

 

After completion, run lsmod drbd | grep drbd and the result should be empty. Try to build your Queue Manager again and it should create successfully.

Tuesday, 19 May 2020

Untangling Governance Definitions - Patterns, Blueprints, Templates, Standards and Reference Architecture

By Aiden Gallagher & Peter Reeves

*Disclaimer: These are our own definitions and might not map to your specific organisation. And, of course, these are our own opinions, and not necessarily those of our employer

Introduction

For the last few weeks, Peter and I have been talking about Integration Patterns, blueprints and architectures to try and boil down a common definition which we can use when talking about these concepts.
We found that halfway through a conversation we would start merging elements and classifying the same integration item as different things.

To remedy this, we decided to write down the definitions as a reference point that we could refer back to. In this blog post you will be able to see these definitions, and when we talk about Patterns, Blueprints, Templates, Standards and Reference Architectures you will know what we mean too.

Why do we care?

Before we share the definitions, it’s important to know why we care about the words themselves. We want to be sure that when we are discussing concepts that we are all referring to the same things and in the same way, related to how artefacts fit into the wider organizational picture and the correct governance procedures when designing systems.

Definitions

Below you will find our definitions and with them an example of how these are applied outside of the computing world. In this example, we will apply them to a housing project and “dwellings”.

Pattern

Definition – A pattern is a refined repeatable concept which is a solution to a common problem.

Example – Given the common problem of a human needing a place to live; have a roof over our heads, running water, sanitation, heat and the ability to cook, a pattern standardises the way we build a ‘dwelling’ that acts as a solution to these problems.

Blueprint

Definition – A blueprint is a detailed design for how to implement a pattern using a certain technology.

Example - A blueprint of the dwelling pattern could be a terraced house which provides dwellings against a limited land space. It could also be a bungalow which provides accessible dwellings for those who cannot use an upstairs.

Templates

Definition – A template is an implementation of a blueprint with further details on the specifications for items of that type. It might be followed exactly, or it might be altered to fit the need of the circumstance.
Example – A terraced house in Darlington was previously built with certain specification. The designer wants to provide more garden space as such they can tweak the template of a terraced house during design. But the template largely remains the same.

Standards

Definition – Standards are an approach, design or method that is applied across all interconnected systems and applications to ensure consistency of approach, and this benefits support, testing, and development.

Example – The plug sockets in all houses are the same size, as that meets the requirements for the majority of household appliances. This means all devices are interchangeable, which in turn means less customisation during build and hence is cheaper to build and more convenient for the end users.

Reference Architectures

Definition – A reference Architecture is a set of documents or information that describe a topology or system that can be used for common and related patterns. The information, if followed, will provide commonality across deployed templates and blueprints.

Example - A large plot of land is bought for building development requiring sewage, electricity, water, gas, and road network. A reference architecture describes how this infrastructure can be setup to accommodate different home styles (patterns) the instructions for building each home (blueprint), and potentially any customisations to the blueprint to fit other requirements (templates, and templated usage). Throughout the whole build process the same style of roofs, doors and windows are purchased (standards).

Integration Example

In the integration world we might apply the above definitions to the following use case.

A hybrid-cloud deployment strategy has been documented which shows how availability, disaster recovery, networking, and deployments of servers, and various business functions might be achieved in a reference architecture for that system.

The cloud deployment has a number of topologies (or building blocks for topologies). These are used as necessary to build integration patterns (e.g. request-reply which needs to solve some high-level problems like: access to a database, transactionality, reliability etc.)

Having selected the reference architecture which will support specific patterns, a blueprints to implement desired patterns using those cloud offerings can be written by the organisation – this could form a high-level design of how the new system will look like, this is further refined and customised in the low-level design. 

Looking at a Hybrid Cloud implementation, there are some orchestrated deployments packaged as part of a cloud offerings to solve specific business needs, which is in itself like an off-the-shelf blueprint combined.

To build the system, a series of templates are used for each cloud product with necessary minor tweaks that meet small nuances of the pattern and blueprint requirements. Throughout all these processes the organization’s standards are used to ensure naming conventions are the same, disaster recovery can be performed by any of the support teams, that port mappings follow the same style for easier communication with the network teams, and any other core business procedures are followed.

The end result is a system that was built quickly, in a reusable, extensible, and familiar way and that is now supportable by the wider organization.

Benefits
By using Patterns, Blueprints, Templates, Standards and Reference Architectures there are obvious tangible benefits:

Standardisation

·      Less complexity when implementing solutions as everything is known.
·      Cost reduction of multiple teams solving the same problems repeatedly (why reinvent the wheel?)

Reusability

·      Once the patterns, blueprints etc. have been shaped and refined, it becomes easier to reuse them than to start the building process from scratch- saving time and energy exponentially.
·      They are easy to use.
·      They are easy to deploy.
·      They are easy to support.

Familiarity

·      There is less project-specific knowledge required when people switch roles as the core patterns (and blueprints) are the same.
·      Individuals are able to get the 'gist' of what is happening in a new project- even for customised docs, build etc- because everything looks and feels the same and was built with the same principles, even if the low-level implementation is slightly different.
·      This familiarity makes it easier and quicker to fix, debug and test new projects.
·      This leads to a reduction in dependencies on individual resources.

Future Proofing for the whole Organisation

·      Improving the pattern by one team improves for all.
·      The whole organisation is carried into modern practices together because of the usage of patterns, blueprints etc.

Limitations

There are some limitations to the usage of Patterns, Blueprints, Templates, Standards and Reference Architectures which tie closely together:

Complexity

·      Sometimes complexity is required, maybe because something has never been done before, or there are new nuances such as security regulations that make a solution difficult to implement using existing patterns.
·      Trying to fit the patterns into these use cases might cause more harm than good e.g. over-engineering, barrier to release time, tendency towards “You aren’t going to need it” (YAGNI) behaviours and a bloated system.

Blocker to change

·      It can be hard to change a pattern because it’s a known entity which people are familiar with. The pattern then becomes a tool to block improvements.
·      It can be hard to get change because the benefits of a new system might not be understood by the wider organisation who must accept these changes.
·      Patterns become tied to governance process. This can undermine the governance process which can be deemed as ‘red tape’.

Stifling Innovation

·      Working only to the pattern can stifle the creativity which comes naturally to a lot of people in an organisation. This means that the pattern and its prescriptive, restrictive methods can lead to a lack of innovation and improvements.
·      It can be hard to get investment for new ideas because there are no any proven benefits, which is perpetuated by a lack of ability to improve existing patterns.

For all these limitations, it is possible with good organisation practices to be able to work around these requirements. This might be by encouraging minimum viable products (MVPs), allowing colleagues to use new tools in their day to day life, and having governance process that look to solve organisational problems and ongoing reviews of current business processes.

Conclusion

In this blog post, we have given our definition of Patterns, Blueprints, Templates, Standards and Reference Architectures, along with a real-world example and a computing example alongside an exploration of the benefits and limitations of using them.


Have any thoughts? Do you vehemently disagree with our definitions? Have a better computing example?  Get in touch to tell us what you think