Posts by Maximilian Batz
The scope of ecr within crystal: or how do I pass in variables and Objects into ECR templates?
As a beginner in the Crystal language I still struggle to get my head around some of the concepts in it, and develop a feel for coding in Crystal. When I come across difficult problems, which I solve or start to understand, I blog about them, so others can benefit – as lack of documentation…
WeiterlesenRoute & Redirect with envoy
An example envoy.yaml showing how to route & redirect. There are different options, see here https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/route/route.proto#route-redirectaction This envoy.yaml routes /taxgod and /taxgod/ (the second could probably be omitted because the first one should also match it, I think) to a new port and a different protocol. /picockpit is simply redirected to / and then finally…
WeiterlesenEnvoy routing and rewriting snippet
It is possible to rewrite URLs with Envoy for the backend. Please note that the HTML output needs to have the proper routes! (That is why I am not going to investigate further in this direction). REF: https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/route/route.proto#route-route Also note that the string is going to be rendered literally for direct_response –> body –> inline_string,…
Weiterlesenenvoy as http 2 front proxy – enabling http 2 for envoy (aka h2)
Out of the box envoy is not configured to set up connections with clients connecting to it with the new HTTP/2. HTTP/2 is optimized for the modern web, with binary headers, etc. – higher speed. Since envoy is capable of speaking HTTP/2 to clients, it is a no-brainer to set it up. And the setup…
Weiterlesenenvoy force SSL example envoy.yaml
static_resources: listeners: – address: socket_address: address: 0.0.0.0 port_value: 80 filter_chains: – filters: – name: envoy.http_connection_manager config: codec_type: auto stat_prefix: ingress_http route_config: virtual_hosts: – name: backend domains: [“*”] routes: – match: { prefix: “/” } redirect: path_redirect: “/” https_redirect: true http_filters: – name: envoy.router config: {} – address: socket_address: address: 0.0.0.0 port_value: 443 filter_chains: – tls_context: …
WeiterlesenSetting up envoy as a front proxy on Docker with communication to other Docker containers
I have already existing containers which I want to use envoy as a proxy & https manager in front of. I am learning to use envoy, and am sharing some of my learnings here, as documentation is a bit confusing to start with. My already existing container is called “taxgod” – it runs a Crystal…
Weiterlesenenvoy.yaml example for http and https rewriting
This is an early example of working with envoy. I find the documentation to be difficult to get into, therefore I will try to track my progress by infrequent blog posts on the matter. The following envoy.yaml works for me for http and https rewriting to google: static_resources: listeners: – address: socket_address: address: 0.0.0.0 port_value:…
WeiterlesenException: Unexpected quote at 1:2 (CSV::MalformedCSVError) Crystal
While trying to parse an Amazon pay file, I stumbled across this particular problem: Exception: Unexpected quote at 1:2 (CSV::MalformedCSVError) The reason: Amazon Pay encodes it’s files in UTF-8 with BOM. The BOM is an optional (in UTF-8 files) marker. You can see it with the tool xxd for instance xxd apolish_amazon_2018DecMonthlyTransaction.csv | less The…
WeiterlesenInstall Crystal on Docker: how to add the Crystal repository to Docker in the Dockerfile
Dockerfile (excerpt) ENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn RUN apt-get update && apt-get install -y \ software-properties-common \ build-essential \ libevent-dev \ libssl-dev \ libxml2-dev \ libyaml-dev \ libgmp-dev \ libreadline-dev \ apt-transport-https \ iputils-ping \ git \ aptitude \ nano \ openssh-server \ && apt-key adv –keyserver keys.gnupg.net –recv-keys 09617FD37CC06B54 \ && add-apt-repository ‘deb https://dist.crystal-lang.org/apt crystal…
WeiterlesenAlpine boot process on the Raspberry Pi
Today we will have a look at the Alpine Linux boot process on a Raspberry Pi in some detail. The picture shows the contents of a “virgin” SD card with the Alpine image, which has not been booted yet. This picture shows the contents of the boot folder. Initial boot Stages on the Raspberry Pi…
Weiterlesen