PAUL'S BLOG

Learn. Build. Share. Repeat.

Fixing a NodeJS Digital Envelope Routines Error

2022-11-08 2 min read Tips and Tricks

In my journey to learn Rust, I’ve decided to pick up this book called “Practical Rust Web Projects” by Shing Lyu.

In the last chapter, you walk through an example of packaging a WebAssembly module using wasm-pack and using the .wasm binary in a NodeJS application. On the step where I needed to compile the application, I ran into the following error:

$ npm run build

> create-wasm-app@0.1.0 build
> webpack --config webpack.config.js

node:internal/crypto/hash:71
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (/Users/paul/repos/Apress/practical-rust-web-projects/Ch06/hello-wasm/client/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/Users/paul/repos/Apress/practical-rust-web-projects/Ch06/hello-wasm/client/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/Users/paul/repos/Apress/practical-rust-web-projects/Ch06/hello-wasm/client/node_modules/webpack/lib/NormalModule.js:471:10)
    at /Users/paul/repos/Apress/practical-rust-web-projects/Ch06/hello-wasm/client/node_modules/webpack/lib/NormalModule.js:503:5
    at /Users/paul/repos/Apress/practical-rust-web-projects/Ch06/hello-wasm/client/node_modules/webpack/lib/NormalModule.js:358:12
    at /Users/paul/repos/Apress/practical-rust-web-projects/Ch06/hello-wasm/client/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/Users/paul/repos/Apress/practical-rust-web-projects/Ch06/hello-wasm/client/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at Array.<anonymous> (/Users/paul/repos/Apress/practical-rust-web-projects/Ch06/hello-wasm/client/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
    at Storage.finished (/Users/paul/repos/Apress/practical-rust-web-projects/Ch06/hello-wasm/client/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:43:16)
    at /Users/paul/repos/Apress/practical-rust-web-projects/Ch06/hello-wasm/client/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:79:9
    at /Users/paul/repos/Apress/practical-rust-web-projects/Ch06/hello-wasm/client/node_modules/graceful-fs/graceful-fs.js:78:16
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v18.7.0

After a bit of Googling, I ran across someone suggesting to run the following command:

Continue reading

Deploying ARM64 workloads to AKS

2022-11-02 6 min read Tutorial

You might have heard by now that Azure has partnered with Ampere to bring ARM-based processors for virtual machines on Azure. This is super exciting as it gives you an opportunity to deploy workloads on highly performant and power efficient virtual machines and these characteristics ultimately result in excellent price-performance (lower costs 🥳)

So… are you ready to deploy your workloads to ARM64 node pools on AKS? I sure wasn’t when attempting to deploy the azure-voting-app-redis application to my cluster.

Continue reading

Sharing Bicep Modules with Azure Container Registry

2022-10-11 14 min read Tutorial

One of the things I do as a Cloud Native Advocate at Microsoft is build end-to-end lab scenarios in the https://aka.ms/oss-labs repo. Most of the demo scenarios we aim to cover is in and around the container space and a majority of the labs uses Azure Bicep to declaratively provision Azure infrastructure. As more labs get spun up, there is a potential for redundant Bicep code. You might have already guessed, there’s a need for re-usable code to spin up AKS clusters.

Continue reading

Autoscaling Azure Container Apps

2022-09-11 6 min read Architecture

So, what makes Azure Container Apps “serverless”?

Today we are going to focus on what makes Azure Container Apps (ACA) a “serverless” offering. But what does the term “serverless” really mean? As much as we’d like to think there aren’t any servers involved, that is certainly not the case. In general, “serverless” means that most (if not all) server maintenance has been abstracted away from you.

With serverless, you don’t spend any time managing and patching servers. This concern is offloaded to Azure and you simply focus on adding business value through application delivery. In addition to operational efficiency, cost efficiency can be achieved with serverless on-demand pricing models. Your workload horizontally scales out based on need and you only pay for what you use. To me, this is serverless, and my teammate @StevenMurawski said it best… “being able to scale to zero is what gives ACA it’s serverless magic.”

Continue reading

Microservices Communications with Azure Container Apps

2022-09-10 7 min read Architecture

Introduction

In yesterday’s #ServerlessSeptember post, we learned what the Azure Container Apps (ACA) service is and the problems it aims to solve. It is considered to be a Container-as-a-Service platform since much of the complex implementation details of running a Kubernetes cluster is managed for you.

Some of the use cases for ACA include event-driven processing jobs and background tasks, but this article will focus on hosting microservices, and how they can communicate with each other within the ACA service. At the end of this article, you will have a solid understanding of how networking and communication is handled and will leave you with a few tutorials to try.

Continue reading

Monitoring Azure Container Apps With Azure Managed Grafana

2022-09-09 10 min read Tutorial

The Azure Monitor team has announced the general availability of the Azure Managed Grafana (AMG) service. As part of the announcement, they also announced the availability of curated Grafana dashboards for various Azure services including Azure Container Apps 🎉

Grafana is very popular within the Cloud Native community and it seems natural to use it for Azure Container Apps (ACA) observability.

In this post, I will walk you through provisioning the ACA and AMG resources using the Terraform AzAPI provider and show you how easy it is to import the ACA dashboards into your AMG instance.

Continue reading
Older posts Newer posts