Thursday 13th August 2026 1:17 PM [Awasu News]

Yep, you read that right, this is an alpha release :-) It's been maintenance releases for some time now, but there's been a metric[1]As opposed to an imperial one :-) butt-load of work done recently, which warrants some preliminary releases.

The main feature is a new search engine. When I first added a search engine to Awasu, back in the Mesozoic Era, there was really only one choice, due to licensing issues. It was slow, had a tendency to crash, and while I did what I could to fix it up, I was never really happy with it :-( However, since then, SQLite has added full-text search to their database engine, which I've used in several other projects, and have never been anything other than very happy with it :clap:

It's finally landed in Awasu, and the results are outstanding. It's blazing fast - I've seen speed-ups of up to 25x - and while I don't have any hard numbers for it, my Awasu just feels so much snappier ::-):

It also allows for matching search terms to be highlighted, something that was sorely missed in the old legacy search engine.

It looks especially good with search channels :-)


TBH, I don't use search much myself, so it probably didn't get as much dog-fooding as other parts of Awasu, but I gave things a thorough work-out while testing the new features, and smoothed out some of the rough edges, so the workflow should be a lot better now.

Oh, and everything was 100% built by this meatbag... :cool:

References

References
1 As opposed to an imperial one :-)
Thursday 6th November 2025 7:34 PM [Tutorial]

Containers have become the de facto way of running applications on the server, and while Docker is the most well-known way of doing this, there are other alternatives e.g. podman, LXC, containerd.

However, they are all built on the same foundational technologies provided by Linux, and this series of tutorials will start off by taking a look at these:

We'll then take a look at how these things are used, in practice:

Finally, we put all these pieces together and build an OCI-compliant image, manually and from scratch, and then run it:

The difference between images, containers and virtual machines

Before we start, it's worth clarifying what these things are, and the differences between them.

A single physical computer can be partitioned into several smaller "virtual machines". These operate as smaller, independent computers, with their own operating system, and can be rebooted or powered on and off individually, as if they were actually separate computers themselves. These don't have anything to do with the subject of this tutorial series - images and containers - so we won't be talking about them at all.

A container is one or more processes that run on the host computer, but are kept separate from everything else through the use of namespaces and control groups. Other than this, they are just normal processes running on the host, same as any other process.

An image is a set of files, and a bunch of settings (e.g. environment variables) that will be used to run a container. It can contain an entire operating system, but it doesn't have to[1]For example, Docker's hello-world image consists of a single file, a small program that prints out the "hello" message we all know and love.. In other words, an image is a static thing, a template for creating containers, while a container is a dynamic runtime thing, consisting of one or more running processes.

References

References
1 For example, Docker's hello-world image consists of a single file, a small program that prints out the "hello" message we all know and love.
Saturday 26th April 2025 11:10 PM [Awasu News]

I timed the release cycle a bit better this time around :roll: , and so on this Awasu Day 2025, I'm pleased to announce the release of Awasu 3.4.

This is a maintenance release, with performance improvements, and some new features, notably support for newer HTML tags and some additional HTTP server responses.

And as before, if you have a 3.x paid version of Awasu, this one's on the house ::-):

Thursday 6th February 2025 1:36 PM [Awasu News]

The first release candidate for the next version of Awasu is now available here.

This is a maintenance release, with a number of small features and enhancements. Reviewing the change list, I note that there were no bug fixes, which is kinda nice :-)

As before, if you have a 3.x license, this one's on the house ::-):

Saturday 23rd November 2024 3:22 AM [General]

I've been bumming around in South America this year, and I was in a restaurant one night that was playing some salsa music, which got me thinking "Hmmm, why not...?"

And so it was I found myself back in Cuba, 10 years after my first trip. People there were telling me that things had changed a lot since then, and while to the tourist's eye, it seemed kinda the same as before, a closer look and a bit of digging around on the intarwebs revealed some significant changes.

Do you have wifi here?

One of the biggest differences I actually didn't see the effects of too much, but it must surely be access to the internet. When I was here before, the only way to get online was to go to the local ETECSA[1]The government communications company. office, queue up in the scorching sun just to get into the building, then you had to queue up again to buy some coupons with a code that gave you internet access (USD 12/hour, IIRC), then queue up again for a computer. If I got in front of a computer in under a hour, I was overjoyed; typically it was 2 hours, I think the record was 3 hours :| And you had to use their computers, there was no wifi, and they invariably wouldn't let me unplug one of their computers from the network and bung the cable into my laptop, so I would often have to surreptitiously transfer files using a forbidden USB thumb drive. The one exception was in Havana, where I went to a swish hotel and they let me use their business centre, and I could connect my laptop to their wifi for some eye-watering price (USD 20 or 25 per hour, IIRC).

Wikipedia states that there is two-tier internet access:

One network link connects to the global Internet and is used by government officials and tourists, while another connection for use by the general public has restricted content. Most access is to a government-controlled national intranet and an in-country e-mail system. The intranet contains EcuRed (a government-run "Wikipedia", supportive of the Revolution.) and websites that are supportive of the government.

which seems to match what I saw e.g. the girl at the ETECSA office at the airport would only sell me a foreigner SIM card[2]Which had to be pre-ordered online at their website :| . I managed to snag a local SIM card in town, but things were ludicrously slow, to the point of being unusable (< 1 KB/s, bursting to maybe 3 KB/s). However, once I turned my VPN on, I got a respectable 200 KB/s, bursting to around 500 KB/s, so it would seem that there's some heavy filtering and blocking going on.

What I didn't really see was how people were using this newly-available internet access. Wikipedia also tells me that people were only able to buy mobile phones (and computers) from 2008, and I saw quite a few people with one[3]I can't remember what it was like last time., including the lower classes, but I don't know how much internet access they had. But it's surely useful for not only keeping in touch with friends and family, but also finding out what's happening in their own country, from non-government sources.

When I did sneak a peek at peoples' screens, they were mostly dicking around on YouTube and WhatsApp, so I guess not that different to everyone else on the planet :| Another thing they also did the same was, even the guys driving a horse and cart sometimes had their noses stuck in their phone, and not paying attention to the road :|

Telegram also seems to be a thing, not only for messaging but also for distributing multimedia. One of my bags is covered in stickers, and I was amazed when a Cuban was able to identify not only Chihiro and the Stink Spirit from Spirited Away but also Pinky and Brain :bigshock: Turned out he was a big anime fan, and there were Telegram channels that people overseas uploaded videos to, where he could download them onto his phone. Using Telegram in this way would also presumably allow people to bypass any blocks the government might have put into place (although they're not above blocking it outright at times).

I also note that when the casa[4]Cubans have been allowed to rent out rooms in their house since 1997, known as "casa particulars" (private houses) and are often much better deals than staying at a hotel. I was staying at had wifi[5]Legalized in 2019, subject to a permit., I usually had to ask them to turn it on (and it had to be re-activated after each power outage), which suggests that they didn't use it much themselves, either because it was expensive, or not of that much use to them, or perhaps they just weren't allowed to :|

Soy tourist, habla Inglés?

Another big difference was the amount of English spoken. When I was here before, almost nobody spoke a word of English, which I found surprising for a place so dependent on tourism. However, I suspect part of that might have been people being reluctant to be seen talking to a foreigner:

Until 1997, contact between tourists and Cubans was de facto outlawed, and Cubans seen in contact with tourists were regarded as potential thieves by police.

The government certainly tried to keep the tourists separated from the locals:

Cuban nationals were once prohibited from entering all tourist facilities except as employees, and the entire tourist economy operates under the Cuban convertible peso[6]A separate currency for foreigners, pegged to the US$., which was originally illegal for Cuban nationals to use.

OTOH, even amongst the owners of the casas that I stayed at, who were obviously allowed to interact with foreigners, the level of English was pretty bad. But this time, even putting aside people who had lived in America and since come back, there seemed to be more people speaking English, in order to service the tourists.

I'm a fairly good musician, and got to play a lot this trip, and this always makes it easier to connect with people, regardless of where you are. I seem to remember being disappointed last trip because even after playing with some bands, and thinking I had connected with them, they still tried to hit me up for money, but I didn't have anything like that on this trip. Things have definitely loosened up wrt access to foreigners, and given the proliferation of tourist restaurants and bars, Cubans are definitely more used to interacting with outsiders.

Where have all the tourists gone?

Cuban tourism was a big thing at the start of the 20th century, but dropped off sharply after the Cuban Revolution in 1959, when the new government closed many bars and gambling halls, and again with the introduction of U.S. sanctions shortly after. However, following the collapse of the Soviet Union and other communist governments in Eastern Europe during 1989 to 1991, upon whom Cuba was heavily dependent, the Cuban economy collapsed, giving rise to the so-called Special Period:

During its existence, the Soviet Union provided Cuba with large amounts of oil, food, and machinery. In the years following the Soviet Union's collapse, Cuba's gross domestic product shrank 35%, imports and exports both fell over 80%, and many domestic industries shrank considerably. ... Cuba's oil imports dropped to 10% of pre-1990 amounts.
...
The early stages of the Special Period were defined by a general breakdown in transportation and agricultural sectors, fertilizer and pesticide stocks (both of those being manufactured primarily from petroleum derivatives), and widespread food shortages.

In particular, food was a problem:

During the Special Period, Cuba experienced a period of widespread food insecurity. ... The primary cause of this was the collapse of the Soviet Union, who exported large quantities of cheap food to Cuba. In the absence of such food imports, food prices in Cuba increased, while government-run institutions began offering less food, and food of lower quality.

The Cuban government was forced to abandon some of their ideological principles in order to survive, part of which involved restarting tourism:

Policies were drawn up to satisfy the growing tourist markets of Canada and Europe with an aim to replace Cuba's reliance on the sugar industry and gain much needed foreign currency rapidly. A new Ministry of Tourism was created in 1994, and the Cuban state invested heavily in tourist facilities. ... By 1995 tourism had surpassed sugar as Cuba's chief income source.

However, the return of tourism has created a two-tier economy, with those who have access to the tourist dollars earning significantly more than those who don't. This has the effect of people moving to the tourist enclaves looking for work, and all the associated problems that happen when they don't find any :|

There was an interesting report from The Telegraph in 2002 about some of the consequences of all this:

Osvaldo Alfonso Valdes, one of the dissident leaders who met Jimmy Carter in Cuba last month, said: "The government permits tourism up to a certain point to earn money. But they don't want the Cuban population to be contaminated by tourists."

But contamination has started and has proved a multiple shock. First, Cubans working with foreigners have become the new rich. A hotel porter makes more from a day's tips than a doctor earns in a month.

Second, Cubans saw foreigners enjoying impossible luxury. Eat a half-pound of beef and you have eaten a Cuban's official ration for six months. A three-egg omelette consumes a week's ration for a Havana citizen.

Finally, and perhaps most damagingly, Cubans have worked out that many visitors are just ordinary people back home.

Mr Valdes said: "Cubans thought all tourists were millionaires enjoying things that they could never have."

I note that the article says that Cubans earn an average of GBP 8 per month, which would've been around USD 11.60 at the time, or $20.30 today. People were telling me that government workers today make around USD 15-30 per month, which matches what I find online, but the current national average would be massively skewed by people working in the now much larger tourist industry, and the new private sector[7]Public sector employment has dropped from 91% in 1981, to 76% in 2000, to 65% in 2023.. Rationing is still a thing, and Wikipedia suggests that eggs are perhaps the same (12 per month, although only from Sep-Dec), but beef is significantly better (1 lb per month).

Everyone was telling me that tourist numbers were nowhere near pre-pandemic levels, and online sources seem to confirm that e.g. perhaps slightly over half that pre-pandemic. As a comparison, UN Tourism saw world tourism in 2023 at around 80% of pre-pandemic levels, with 2024 expected to be close to 100%.

There were tourists in the main part of Old Havana, but it's difficult to gauge how busy things actually are, and how it compares to pre-pandemic times[8]Although checking my photos from the last trip, there are noticeably fewer street stalls and activity in the plazas.. I would normally try to get a feel for how pushy and desperate the touts are, but they're kinda weird in how they do things, anyway[9]They will yell at you from across the street "Hey amigo, buy cigars!", but if you just ignore them, they won't follow up. :|

But I did get to see a bit of that with the owners of each casa I stayed at. If you look at reviews for those that are online, they're invariably glowing, across the board 5-star reviews, and they're usually justified. Casa owners are incredibly helpful, and will go many extra miles to make sure your stay is perfect in every way, because they simply need the money, and unfortunately, you could sometimes hear the desperation in their voices as they pitched their services to you. And every now and then, you would see a flash of anger or resentment at having to kiss so much tourist ass :| These guys are earning US$, but since there are so many casas now, and so few tourists, income is very sporadic, and everyone was praying for a better high season this year (Nov-Apr).

Going private

Cuba has long held the prize for hands-down, without a shadow of a doubt, the worst food I have ever had in the 80-odd countries I've been to. I had been reading online that things had improved a little recently, and I'm glad to report that this seems to be the case. Admittedly, I was going to flash, expensive places in the tourist areas, but even then, a main course was only USD 8-15, and the food ranged from OK to not bad, and even occasionally quite good.

This suggests that the businesses are thinking about what their customers want, and how to best provide that i.e. something vaguely akin to a competitive free market :shock: You might laugh at such an observation, but it really wasn't the case before. IIRC, tourists had to go to restaurants approved for foreigners[10]All government-owned and heavily subsidized., and since they would go to a place once before moving on to the next town, there was absolutely no incentive for the business to do anything to generate return custom. Locals couldn't afford to go to these places (even if they were allowed to), and so there was no feedback loop, where bad restaurants went bust and the good ones thrived.

I think they key difference is that 10 years ago, most of these places targeting tourists simply didn't exist[11]I certainly don't remember seeing many., and it's only since very recently people have been able to start a private business. Since 2010, Cubans have been allowed to work "cuentapropismo" (self-employment)[12]For example, driving a taxi, cutting peoples' hair in your living room, casa owners., as part of the so-called New Cuban Economy[13]Long, but worth reading., but changes in 2021 allowed people to set up businesses[14]Either state- or privately-owned, or a mix. with up to 100 employees. There is a list of permitted industries[15]Which excludes "core activities" such as health, telecommunications, and banking., and the whole thing is heavily regulated[16]For example, companies must import and export via state-owned entities., but it's still a huge change from the previous state of affairs. As with the changes during the Special Period, it appears to have been driven by a crumbling economy, caused by a combined whammy of tourism being decimated by the COVID-19 response, reduced support from places like Russia, China and Venezuela[17]Russia and Venezuela because they have their own problems right now, China because the unpaid bills have been piling up :-) , increased U.S. sanctions, and massive inflation. These SME's have quickly filled a gap, providing goods and services the government has been unable to:

Just three years after they were first allowed in 2021, small and medium enterprises have become significant importers of food and other essential goods, filling the gap left by the cash-strapped government and providing a lifeline to many Cuban families. They also provide various services, from construction and transportation to senior care and software programming.

The government has been dicking around with these economic reforms for quite some time, but all these problems happening at the same time have forced their hand:

The lack of tourism, the high public expense due to the health emergency resulting from the pandemic and the US sanctions make for a complicated situation that has finally pushed Miguel D?az-Canel's government to undertake reforms long postponed due to ideological imperatives.

But old habits die hard, and it's as much about political ideology as it is about economic reform:

While economic measures make modest progress, the old habits characteristic of centralised government remain. The absence of a change in the political framework reduces the impact of real reform. Authorisations to set up companies and grant them credit remain in the hands of a state that prioritises stifling any hint of political dissent.

And while the surge of new businesses are certainly helping to re-invigorate the Cuban economy, it's also created a dual economy, with people in private businesses earning[18]Often in prized US$ or Euro. far, far more than state employees, thus inevitably causing inflation and social unrest.

Cuba used to have two currencies, the Cuban peso (CUP) for local use and the convertible Cuban peso (CUC) which was pegged 1:1 to the greenback, 25:1 to the CUP, but the CUC was dropped in 2021 as part of the so-called monetary re-ordering. State salaries were increased significantly in anticipation of inflation, but this appears to have been insufficient. The government claimed an inflation rate of around 45% last year, but others say the real figure is over 200%[19]As a comparison, Argentina currently has an inflation rate of around 200%, one of the highest in the world (although it has been on a downward trend in 2024, since Milei took power).. The official rate for USD is around 110/123 CUP for buy/sell, but the black market rate is closer to 320, a remarkable difference[20]As a comparison, you could get about 30% better rates on the street in Argentina (although it seems to have tightened up since then), and around 60-90% better in Bolivia. to the official rate, thus creating an even bigger divide between those who have dollars, and those who don't.

On the ground

Statistics are all well and good, but what's happening to people on the street? The Havana Times reports that they're hungry:

Currently, 88% of Cubans live in extreme poverty, 13% more than in 2022, according to the 6th Report on the State of Social Rights in Cuba, recently presented in Miami by the Cuban Observatory of Human Rights (OCDH).

The research considers that a household of three members is in extreme poverty if their total income is $1.90 per day or less. 48% of those interviewed admitted to going without meals due to lack of money or resources to obtain food.

In 2023, the impact of the food crisis and inflation has grown in most Cuban households, confirming "the serious state of social rights on the island," according to the OCDH.
...
According to "on-the-street" surveys, "we are facing an increasingly impoverished country, not only when we analyze household income but also when we see that a large number of Cubans have had to skip a daily meal, or that a significant number cannot find medications or take expired ones,"

If that wasn't enough, they also have to worry about their house falling down on top of them :blink:

At the same time, 15% of homes are at risk of collapsing, a situation that rises to 24% for those over 70 years old.

There isn't a lot of hope:

"We are an island of zombies, staggering around with no idea where to go," said Giovanny Fardales, a 51-year-old unemployed translator in Havana, who sent messages as his cellphone battery steadily ran down.

"Maybe I won't be able to communicate much longer. We're on the Titanic and it's slowly sinking," he added.

As a result, an extraordinary 10% of the population left the country in 2022+23, perhaps even 18%. There is also the important consideration of who is leaving - it's the people who have a chance to build a new life overseas, the young, the strong, the educated, the ambitious i.e. the kind of people you need to stick around when you want to rebuild your country[21]This is on top of all the doctors and engineers and lawyers who have left their professions to work as waiters and taxi drivers, because they can make so much more money, thus creating a weird … Continue reading :-(

Many Cubans have long dreamed of the regime's collapse. But that is unlikely, and would bring other problems. The opposition lacks structure, a programme or people, inside or outside, says Carlos Alzugaray, a former Cuban diplomat. "The best chance of change is coming from the current government."

But it is not happening. "We're working with a regime with no plan, no way forward, no way out," says Ricardo Z??iga, a former American official. "It is enabling not just economic collapse but social collapse too." Emigration is at record highs. "Our neighbourhood is emptying out of young people," says Juneir, who lives in a Havana suburb. "If this country had [land] borders, there would be nobody left."

As a visitor, you don't see any of this. You're in the tourist areas, full of private businesses catering to the tourists, staying in casas approved for foreigners, eating at restaurants that only a foreigner could possibly afford, where everyone is earning US$. You don't see people skipping meals, you don't see your waiter at his two other jobs, you don't see his mom queuing for hours to get bread and milk rations, but coming home empty-handed because there isn't any. But I like to wander around a town, and sometimes end up in places I shouldn't really be :-) , and it wasn't pretty. Likewise, when travelling between towns, you would often go through poorer neighborhoods, and got a glimpse of how bad things were for the people who lived there.


It wasn't me!

So, things are pretty bad. People are hungry, can't get medicine or treatment for even basic stuff, there are crippling power outages, and the people you need to stay are fleeing the country. What do you do?

Well, politicians gonna politician, so they've been hard at work blaming everything and everyone other than themselves e.g.

  • U.S. sanctions, which were being rolled back during the Obama administration, but hardened by Trump[22]And with Trump's re-election, the outlook is grim :-( and then Biden
  • a large increase in the use of air conditioners[23]Over $1M worth of air-conditioners and parts were imported in 2024. has also been blamed for the power grid becoming overloaded :-)

Furthermore, private businesses are supposedly:

There are rumblings that hard-liners in the ruling Communist Party are unhappy with the speed and direction reforms have been taking the country, and as pointed out in the 2002 Telegraph article:

"The great dilemma for a totalitarian regime is giving economic rights to the people," said Mr Valdes [a dissident leader]. "The government fears the emergence of independent businessmen, who do not need their rations, or certificates of political rectitude to get a good job."

Private businesses are a convenient, high-profile, politically attractive target, and the government is indeed going after them, with a slew of new taxes and fees, price caps, and restrictions and regulations (some of which will be impossible to comply with).

"They fear the private sector because it's autonomous, they make their own decisions, and they see that as threat," Torres [a faculty fellow at American University in Washington, D.C., who was previously with the Center for the Study of the Cuban Economy at the University of Havana] said.

The changes also seem to be as much about protecting inefficient state enterprises from competition[25]Not to mention vested interests of connected people :| , as they are trying to fix the economic problems:

The government is not even able to pay for the food distributed through rationing cards, but Cuban leaders, who that insist state-owned "socialist enterprises" should be predominant in the economy, have become hostile to the rapid growth of the private sector.
...
The private sector has become a formidable competitor to the conglomerate known as GAESA, which is run by the military and which controls large sectors of the Cuban economy. GAESA used to control the foreign currency entering the country in the form of remittances - money sent by Cubans abroad to families on the island. But the Trump administration sanctioned the military company handling remittances, and Cubans in Miami found other informal channels to send money to relatives, which ended up helping finance private businesses.
...
"At first glance, these new laws represent another major step backward for the Cuban economy," said Ric Herrero, the executive director of the Washington-based Cuba Study Group, a Cuban-American organization that supports the island's private sector. "They generate a lot of uncertainty but do make it clear that their goal is neither economic nor developmental growth. Instead, they appear primarily designed to hinder the growth of the Cuban private sector and protect the interests of under-performing state-owned companies."

Who turned out the lights?

Cuba has had problems with their power grid for decades, but things have been deteriorating badly over the past few years:

His town now goes with just 12 hours of electricity a day. Food turns bad in the refrigerator while the long power outages are taking their toll on people's rusty machines. "Many families are losing their fridges, TVs and fans," he said.

The article is from 2022, but today in 2024, things are even worse e.g. Santiago de Cuba is getting power for only 3 or 4 hours a day, and are generating a measly 10% of what's actually needed, to the point where even hospitals are getting cut off. And there's a resentment against the Habaneros for the easier ride that they've been getting:

[T]hose who claim for the umpteenth time the inequality between the Island?s East and West in the distribution of power did not take long to arrive. ?Why ask for empathy when we don?t all suffer in the same way. Why does Havana, which consumes the most electricity in the country, have cuts for only two hours in the morning? Aren?t we the same? Aren?t we Cubans? What we are not is equitable. Check for yourselves,? [a man in Santiago] reproaches.

All this matches what I saw. When I was in Havana, things were not too bad (maybe a 1-hour outage now and then), but in Vi?ales, there was power for only an hour a day[26]Usually at around 2am :| :bigshock: . I got the impression that this was unusually bad, but even when it started to come back at the end of my stay, it was only for maybe 6 or 8 hours each day. Trinidad was about the same, although I was told that the place that sold oil had had some sort of breakdown, so even those who had generators were having trouble keeping them running :wall:

As is so often the case, the problem seems to be a lack of money and planning:

Cuban economists and foreign analysts blamed the crisis on several factors: the government's failure to tackle the island's aging infrastructure; the decline in fuel supplies from Venezuela, Mexico and Russia; and a lack of capital investment in badly needed renewable systems, such as wind and solar.

Jorge Pi?on, a Cuban-born energy expert at the University of Texas at Austin, highlighted that Cuba's electricity grid relies on eight very large power plants that are close to 50 years old. "They have not received any operational maintenance, much less capital maintenance, in the last 12 to 15 years," he said, adding that they have a lifetime of only 25 to 30 years.

"So, number one, it's a structural problem; they are breaking down all the time, and that has a domino effect," he said.

And this:

The core issue remains: the regime lacks a long-term strategic plan. Despite substantial financial backing from Hugo Ch?vez (2000?2013), the government neglected to invest in upgrading energy infrastructure. In 2016, Russia offered a USD 1.2 billion credit to overhaul Cuba's electrical grid, but bureaucratic inefficiency led to a missed opportunity. Furthermore, over recent decades, the government has invested heavily in expanding luxury tourism infrastructure while neglecting other critical sectors of the economy.

The Cuban government has bet heavily on high-end tourism, building new hotels despite an already dismal occupancy rate[27]And this assumes rooms that are actually usable :| , presumably as an easy source of foreign currency[28]The fact that GAESA, the military-owned conglomerate that controls businesses in many sectors across Cuba, owns most of the hotels probably has something to do with it, as well :| , but visitor numbers have fallen far short of expectations. Unfortunately, this spending takes money away from other things, such as maintaining the power grid and feeding the people.

In the first three months of 2022, the construction of hotels, as well as other aspects related to tourism, accounted for 35% of total investments, according to data from the National Office of Statistics and Information (ONEI).

This means that 20 times more was invested in this area than in public health (1.7%) or education (1.2%), according to official figures.

Fidel Castro once famously described the Cuban power stations as "pre-historic", and a big part of the problem is that they use very old technology that requires a lot of oil to operate, something that Cuba simply doesn't have[29]Much of it used to come from Venezuela and, to a lesser degree, Mexico and Russia, but this has been cut back in recent years.. Cuba does produce some itself, but nowhere near enough, and it's not particularly high-quality and is damaging the machinery :roll:

Compounding the problems, Cuba burns crude oil as a fuel for its plants. Experts said Cuba's own crude oil production is very heavy in sulfur and metals that can impair the thermoelectric combustion process. "So they have to be constantly repairing them, and they're repairing them with Band-Aids," said Mr. Pi?on.

Jorge Pi?on also posits that internal problems with infrastructure and logistics may also be to blame.

To help keep the lights on, Cuba has leased a fleet of floating power stations from Turkey, but part of the deal is that Cuba supplies the fuel to run them, so these things are often offline themselves :|

Technical debt comes due

A few days before I was due to leave Cuba, it all came to a head and the national grid collapsed, blacking out the entire country:

The experts had warned for years: Cuba's power grid was on the verge of collapse, relying on plants nearly a half-century old and importing fuel that the strapped Communist government could barely afford.

On Friday morning their dire predictions came true, as the entire island plunged into the most prolonged blackout it has suffered in the three decades since its former benefactor and steady fuel supplier, the Soviet Union, collapsed.

I was in Trinidad at the time, and TBH couldn't tell that anything had happened, since the power being out was hardly unusual :roll: , but I soon realized that this was different, since the Cubans were all talking about it.

And different it was. Cuba has suffered national power outages before, but always because it had been hit by a hurricane; this was the first time things had just simply broken down :| . The largest power plant had failed, and taken the entire grid down with it. They had to try a few times to restart it, and it took 3 or 4 days for things to start getting back to normal[30]Thankfully, just before my flight. CNN was reporting that the airport was operating in the dark on emergency power, and they were having trouble issuing tickets because printers were not working :| . Schools and businesses were closed down, only essential staff were to go to work, and what little power was available was used to keep hospitals and government offices running[31]Which had the interesting side-effect of one guy I knew suddenly becoming everyone's best friend, since he lived near a hospital, and so had power, and everyone wanted to come over to his place to … Continue reading. Some people had no water, there was no bread (since most bakeries closed), and people were losing food[32]And medicine that needed to be kept cold. in refrigerators. To try and save this food, people were cooking it over open fires out in the street :bigshock: There was a plan to transfer some oil from tanker ships, but that was stymied by a hurricane that hit Cuba just after the power outage started. It never rains, but it pours[33]Two weeks after this incident, Cuba suffered another national outage after it was hit again by another hurricane, and then almost immediately after that, two earthquakes :bigshock: :|

I returned to Havana to catch my flight out, only to find that things were worse there :wall: Because they hadn't really been affected by the on-going power outages that the provinces suffered through daily, few people had generators, and so they were completely dead in the water[34]Including, apparently, the British ambassador, whose generator blew up on the first day, and was flushing the toilet with water from the pool. I guess, at least he had a pool :| . Most restaurants were closed, and I had to wander around for quite a while to find somewhere to eat[35]The big hotels weren't letting anyone in who wasn't staying there :| . I kept reminding myself that, as a rich tourist, this was just a minor inconvenience for me, but I did see a noticeable uptick in the number of people begging on the street, asking for food.

Alternative energy sources

An obvious question is why isn't Cuba using alternative energy sources, and reducing its dependence on oil? They started building a nuclear power plant in the 80's, under the supervision of one of Fidel Castro's sons, who had studied nuclear physics in Moscow, but this was abandoned[36]Which is perhaps not a bad thing, either :| half-way through, another victim of the Soviet collapse and lack of money.

As part of the Paris Agreement in 2015, they committed to generating 37% of their energy from renewable sources by 2030, and they're working on it, but as always, the devil is in the details:

But experts say the government hasn't updated its internal policies regarding foreign ownership and private financing, especially for critical solar projects, and are still focused on petroleum fuels.
...
"So all of this investment and financing, not just from the U.S. but from other countries ... that are ready to take a chance in Cuba, sit idle, and that is hundreds and hundreds of millions of dollars," [John Kavulich, president of U.S.-Cuba Trade and Economic Council Inc.] said.
...
One of Cuba's biggest trading partners, China, makes 80% of the world's solar panels, according to the energy data and analytics firm Wood Mackenzie, and they are inexpensive. China committed in March to building 92 solar farms on the island that are expected to add more than 2,000 megawatts of energy, and reports in June said China donated three solar parks expected to add 1,000 more. But that trade relationship has not yet led to a buildout that would at least keep the lights on during the day. The whole country had only 252 megawatts of solar power at the end of 2022.

Kavulich said even China has its limits. The view of China's private sector, he said, is that Cuba "seems to make no effort whatsoever to pay money that it owes."

Can't get out of its own way

Wade "Vagabond Journey" Shepard described Cuba as "an extremely impoverished, heavily polluted, authoritarian backwater that can't get out of its own way", and there's a lot of truth to that. Yes, U.S. sanctions are brutally painful, and support from other Communist countries has dwindled away, but many of its problems have been self-inflicted:

China publicly supports Cuba's right to choose its own path to economic development "in line with its national conditions", but privately Chinese officials have long urged the Cuban leadership to shift from its vertically planned economy to something closer to the Chinese model, according to economists and diplomats briefed on the situation.

Chinese officials have been perplexed and frustrated at the Cuban leadership's unwillingness to decisively implement a market-oriented reform programme despite the glaring dysfunction of the status quo, the people said.

The article then goes on to point out:

"The Chinese don't give away a lot of charity," said William LeoGrande, professor of government at American University. "The Cubans right now are in a position where they need charity, and they don't have much to offer in return."

With Russia pre-occupied in Ukraine, Venezuela itself collapsing[37]Cuba has one of the highest number of doctors per capita in the world, and export them to other countries in return for favorable trade terms. This happens, in particular, with Venezuela (whose … Continue reading, U.S. sanctions hobbling Cuba's ability to generate income via international trade, it's difficult to see how Cuba gets out of this. Food shortages are bad enough, but without power, you can do nothing, and once the grid finally gives up the ghost, that's it, game over. Maybe things deteriorate further, to the point where the Chinese step in and make an offer the Cubans can't refuse :| . For them, it seems to be simply about business, rather than ideology:

Chinese companies involved with state-backed deals were owed large sums by the Cuban state, said people briefed on the debts. "All of the big state companies like Huawei and Yutong are owed hundreds of millions of dollars each," said an overseas businessperson who trades with the island.

Scant raw materials and an unproductive economy leave the island with little to export to China, while imports have diminished in recent years as hardened US sanctions severely aggravated Havana's chronic late-payment problems and dried-up credit lines.

Since the Covid-19 pandemic, sugar production on the island - once a critical industry - has plummeted to its lowest levels in more than a century: there is barely enough sugar to cover domestic requirements. That has resulted in the scrapping of a long-standing agreement to export an annual 400,000 tonnes of sugar to China.

"China is not Cuba's sugar daddy," said Fulton Armstrong, former US national intelligence officer for Latin America. "It's mostly a relationship of solidarity statements. It's not a strategic relationship for either country."

Dead dog in the middle of the road

I took a taxi to get to Trinidad from Havana, and it was one of the odder trips I've ever taken. We took the main highway, 6 lanes for much of the way, but there was almost no traffic, in both directions[38]Presumably due to a lack of fuel, or need to travel.. We passed a car that had broken down, and the guy had just left it there in the middle of the highway, since it wasn't worth the effort to push it to the side of the road :-)

There was the odd bus, another taxi loaded with tourists, but no trucks, nor farmers carting their produce around, which you would normally expect to see. Except for one convoy of 5 or 6 big trucks, that had a police escort. I asked my driver what they were carrying, and he said food, which gives you an idea of how dire things must be.

The most exciting thing I saw during the 4-hour trip was a pack of vultures feeding on a dog in the middle of the road that, despite the complete lack of traffic, had somehow managed to get itself squashed. Cubans are tough and resilient, because they have no choice other than to be, but that dog was really an apt, if unfortunate, metaphor for the place :-(

References

References
1 The government communications company.
2 Which had to be pre-ordered online at their website :|
3 I can't remember what it was like last time.
4 Cubans have been allowed to rent out rooms in their house since 1997, known as "casa particulars" (private houses) and are often much better deals than staying at a hotel.
5 Legalized in 2019, subject to a permit.
6 A separate currency for foreigners, pegged to the US$.
7 Public sector employment has dropped from 91% in 1981, to 76% in 2000, to 65% in 2023.
8 Although checking my photos from the last trip, there are noticeably fewer street stalls and activity in the plazas.
9 They will yell at you from across the street "Hey amigo, buy cigars!", but if you just ignore them, they won't follow up.
10 All government-owned and heavily subsidized.
11 I certainly don't remember seeing many.
12 For example, driving a taxi, cutting peoples' hair in your living room, casa owners.
13 Long, but worth reading.
14 Either state- or privately-owned, or a mix.
15 Which excludes "core activities" such as health, telecommunications, and banking.
16 For example, companies must import and export via state-owned entities.
17 Russia and Venezuela because they have their own problems right now, China because the unpaid bills have been piling up :-)
18 Often in prized US$ or Euro.
19 As a comparison, Argentina currently has an inflation rate of around 200%, one of the highest in the world (although it has been on a downward trend in 2024, since Milei took power).
20 As a comparison, you could get about 30% better rates on the street in Argentina (although it seems to have tightened up since then), and around 60-90% better in Bolivia.
21 This is on top of all the doctors and engineers and lawyers who have left their professions to work as waiters and taxi drivers, because they can make so much more money, thus creating a weird localized brain drain.
22 And with Trump's re-election, the outlook is grim :-(
23 Over $1M worth of air-conditioners and parts were imported in 2024.
24 Thus reducing the amount the government has for supporting the people.
25 Not to mention vested interests of connected people :|
26 Usually at around 2am :|
27 And this assumes rooms that are actually usable :|
28 The fact that GAESA, the military-owned conglomerate that controls businesses in many sectors across Cuba, owns most of the hotels probably has something to do with it, as well :|
29 Much of it used to come from Venezuela and, to a lesser degree, Mexico and Russia, but this has been cut back in recent years.
30 Thankfully, just before my flight. CNN was reporting that the airport was operating in the dark on emergency power, and they were having trouble issuing tickets because printers were not working :|
31 Which had the interesting side-effect of one guy I knew suddenly becoming everyone's best friend, since he lived near a hospital, and so had power, and everyone wanted to come over to his place to recharge their phone :-)
32 And medicine that needed to be kept cold.
33 Two weeks after this incident, Cuba suffered another national outage after it was hit again by another hurricane, and then almost immediately after that, two earthquakes :bigshock:
34 Including, apparently, the British ambassador, whose generator blew up on the first day, and was flushing the toilet with water from the pool. I guess, at least he had a pool :|
35 The big hotels weren't letting anyone in who wasn't staying there :|
36 Which is perhaps not a bad thing, either :|
37 Cuba has one of the highest number of doctors per capita in the world, and export them to other countries in return for favorable trade terms. This happens, in particular, with Venezuela (whose health system is collapsing), in return for oil.
38 Presumably due to a lack of fuel, or need to travel.
Friday 5th April 2024 8:52 PM [Tutorial]

For quite a few years, I've had a Raspberry Pi sitting on my local network, running a bunch of Docker'ized applications. It's managed by a bunch of shell scripts, and while it works, it's a bit hacky[1]The rPi also struggles a bit sometimes, since one of the things I run is Sonatype Nexus, and "pig for memory, runs like a dog" doesn't even begin to describe it :-| , and I've had a long-standing item on my to-do list to be a Big Boy and Do Things Properly i.e. run it all on Kubernetes :-|

My workload is nowhere near big enough to warrant a full Kubernetes cluster, so I'll be using K3s, which is intended for smaller workloads, and for extra style and difficulty points, I'll be running it on Fedora CoreOS, a minimal OS designed for running container workloads. In particular, it's immutable, so you don't e.g. apply updates and install new packages, you blow the whole thing away and replace it with a new image.

There are any number of tutorials out there on the intarwebs for setting up both K3s and CoreOS, but it's a pretty trivial process. However, the devil is, as always, in the details[2]AKA it's always DNS SELinux :-| , and since there are quite a few niggling issues when setting up a usable server, I've documented the whole process here. It's relatively straight-forward once you've figured out how things work; the tricky thing is, of course, figuring out how things work :-|

Tutorial index

  1. In which we set up the server
  2. In which we install CoreOS
  3. In which we install K3s
  4. In which we deploy a demo app
  5. In which we set up the Traefik dashboard
  6. In which we enable TLS for our demo app
  7. In which we enable SSH access into our demo container
  8. In which we install Open VM Tools into CoreOS
  9. In which we (don't) install other extra packages and tools into CoreOS
  10. In which we don't fix the problem of slow shutdowns :-|
  11. In which we also don't configure the firewall :-|
  12. Odds and ends.

If you liked this tutorial, there's another one here about setting up a bare-metal K8s cluster.

References

References
1 The rPi also struggles a bit sometimes, since one of the things I run is Sonatype Nexus, and "pig for memory, runs like a dog" doesn't even begin to describe it :-|
2 AKA it's always DNS SELinux :-|
Tuesday 28th February 2023 4:47 PM [Awasu News]

Get it here!

This is a maintenance release, with mostly bug fixes and performance improvements, and since it's been a while since the last release, the support period for the paid versions has been extended. So, if you purchased (or renewed to) version 3.2, you'll be eligible for this version.

I'm off to the pub :jig:

Tuesday 29th November 2022 2:57 PM [Awasu News]

It's been a while since the last release, but the first release candidate for the next version of Awasu is available here.

This is a maintenance release, with mostly bug fixes and performance improvements, and since it's been a while since the last release, the support period for the paid versions has been extended. So, if you purchased (or renewed to) version 3.2, you'll be eligible for this version.

Thursday 11th August 2022 11:08 AM [Tutorial]

One of the things that has really bugged me over the years is the trend of writing programs in such a way that they download a large number[1]Sometimes hundreds, or even thousands! of third-party libraries, written mostly by unknown randos on the internet, and then running them as part of your program. It's an obvious security risk[2]There have been quite a few of these so-called "supply chain attacks" in recent times., and even if you go to the trouble of verifying that something is trustworthy, there's no guarantee that it will remain so over the life of your program[3]For example, hackers could take control of a repository, or perhaps someone takes over an expired domain name, and thus its email addresses, which might give them control of a library's repository.
.

With the rise of containerized applications, these dependencies are downloaded over and over and over again, each time the image is rebuilt, which is a problem if your internet access isn't great, and regardless, the engineer in me just detests this kind of waste and inefficiency, just on principle :roll:

One way to solve these problems is to run a local proxy for the online repo's i.e. something that downloads the dependencies for you, and caches them. This doesn't address the issue of trusting a third-party library in the first place, but one thing that will help establish that trust is time i.e. after you've been using it for a while, and nothing has been reported on Hacker News or Reddit about problems with it, this will help increase your confidence that it's OK[4]This requires that the artifacts that have been cached in your local proxy are immutable, to prevent attacks by a malicious party on the version stored in the online repo..

There are a few programs out there that provide this kind of service[5]For example, devpi, local-npm, or a Docker pull-through cache., but they are specific to their particular repository[6]Pulp offers support for different types of repository, although the list doesn't seem quite as extensive as Nexus.. However, Sonatype's Nexus Repository Manager offers support for a large number of online repositories, thus providing a one-stop solution, and this tutorial will go through the process of setting it up, and configuring it for some of the more popular online repo's.

Before we start

  • I run my own DNS, and have set it up so that the name nexus3[7]I originally used nexus, but this causes problems when trying to open the admin interface in a browser, because that name is on the HSTS preload list, which means that the browser will force the use … Continue reading resolves to the server running Nexus[8]Actually, a Docker container fronted by nginx.. This can cause problems when trying to access Nexus from inside a Docker container[9]Since DNS often operates differently there., which is discussed here. However, in all cases, you can also reference the server by its IP address[10]Unless, of course, you're running Nexus in a Docker container fronted by nginx :roll: .
  • Nexus stores artifacts in the file system, and while it's not essential to do so, it's possible to keep things in separate sub-directories by creating a new storage blob for each one.
  • Nexus doesn't seem to have an option to force downloaded artifacts to be immutable, but it's possible to configure repositories to never check back with the online repo to see if an artifact has changed (by setting the Maximum Component Age to -1), which is close enough.

Tutorial index

References

References
1 Sometimes hundreds, or even thousands!
2 There have been quite a few of these so-called "supply chain attacks" in recent times.
3 For example, hackers could take control of a repository, or perhaps someone takes over an expired domain name, and thus its email addresses, which might give them control of a library's repository.
4 This requires that the artifacts that have been cached in your local proxy are immutable, to prevent attacks by a malicious party on the version stored in the online repo.
5 For example, devpi, local-npm, or a Docker pull-through cache.
6 Pulp offers support for different types of repository, although the list doesn't seem quite as extensive as Nexus.
7 I originally used nexus, but this causes problems when trying to open the admin interface in a browser, because that name is on the HSTS preload list, which means that the browser will force the use of HTTPS :-|
8 Actually, a Docker container fronted by nginx.
9 Since DNS often operates differently there.
10 Unless, of course, you're running Nexus in a Docker container fronted by nginx :roll:
11 For example, those used by Red Hat, Fedora and Rocky Linux.
Saturday 5th March 2022 3:09 PM [Tutorial]

I've always been fond of the phrase "cattle, not pets", which refers to the idea that computer servers should be treated as cattle (i.e. you should have no problem killing them), as opposed to pets. One of the most important changes over the 35+ years I've been a professional developer is the rise of automating processes. Back in the day, if you wanted to set up a new server, you did it manually, carefully installing all the software and other dependencies, then even more carefully configuring them, and since you didn't want to have to do that work again[1]And it was often the case that you couldn't re-create them, even if you wanted to, because of all the minor tweaks and changes that were invariably made over time, that didn't get documented., these servers were treated as precious pets. But today, with the rise of technologies such as Ansible and containers, servers are disposable - if one fails, just throw it away and run a script to create a new one.

This approach introduces some new considerations (e.g. managing a fleet of servers, re-creating them when they fail, etc.), giving rise to a new class of software known as container orchestration. The king of these is Kubernetes, and since I recently did a bit of work with this, I wanted to set up a local instance for testing. While there are things like minikube, that let you set up a local cluster on your PC, there's nothing like a proper test environment that mirrors a real production environment as closely as possible.

The trend these days is, of course, to do everything in the cloud, so there's no shortage of information on how to set things up using e.g. AWS or GCP, but rather less on how to set up a bare-metal local cluster, so we'll remedy that here with a set of instructions on how to set up a local Kubernetes instance that has:

  • a single VM that provides the control plane
    It's possible to have a single server manage the control plane and act as a node (i.e. run containers), but in the interests of making this cluster as "real" as possible, we'll separate them out.
  • two more VM's that will act as nodes[2]These will actually run the containers.
    We want two of these, so that we can test things like distributing workloads over multiple servers, automatic failover if a server goes down, etc.
  • dynamically-provisioned disk space
    This gives us persistent disk storage, even as servers come and go.
  • a local Docker registry to store images
    So that we don't have to put them on Docker Hub.

Tutorial index

If you liked this tutorial, there's another one here about setting up K3s on Fedora CoreOS.

References

References
1 And it was often the case that you couldn't re-create them, even if you wanted to, because of all the minor tweaks and changes that were invariably made over time, that didn't get documented.
2 These will actually run the containers.