Immich in Docker

Immich (github) is a media library tool.

At some point I’ve lost my QNAP drives (both at the almost the same time) and wanted to check if I could replace the PhotoStation with an opensource tool.

Immich was one of the candidates but if has a major drawback for me. I dislike that it renames the files you upload/import/sync with it. Although it allows you to download them and the metadata it keeps (in a database) contain all the info and the result you get is the original filenames, you cannot suddenly stop using it and pick the file structure and use it. If you lose the database you have to manually rename and organize all files which can be practically impossible if you have several thousand images or videos in your library.

Read more →

Adding Emoji in Hugo Post 😄

I’ve seen a particular Hugo theme called hello-friend which I liked and choose to start with it. However, in a post I thought of adding an emoji (a simple 😄). But it didn’t work, and the reason is that the template did not use a parsing for them. However Hugo supports them, and I only hade to change this in one place in the template to make it work. So in themes/hello-friend/layouts/_default/single.html change :

Read more →

Blogging with Hugo

Following a guide from Ryan in youtube.. (https://www.youtube.com/watch?v=LIFvgrRxdt4)

What you need:

  • 2 repos, one for the code of the site and one to deploy (we are going to use github pages)

Those two repos will be joined using git submodule.

In the code repo do: git submodule add -b main <github pages repo> public Where the -b main is the branch of the repo, abd public is the folder that will be linked within the code repo and will point to that branch of the github pages repo.

Read more →

letsencrypt and traefik with docker compose

problem statement

In a free tier oci instance I wanted to have a single point of entry with TLS and valid certs I also wanted to have multiple containers served using a wildcard domain. Also needed to be able to add new containers and immediately have them available with cert and fqdn

BOM

  • traefik
  • duckdns
  • letsencrypt
  • docker compose
  • env-file for docker compose

docker compose

This is the choice for deploying services.

Read more →

elasticsearch notes from a slack app

creating a small app with ES as backend

This is a series about a slack related app where we use ES as the backend for every event we would possibly like to store for analysis.

There are few things we need to consider and the first is related to the fields provided by the slack api that are related to dates and timestamps.

Most of them are ending with ts. By storing all events in ES we can then go and identify them.

Read more →

Elastic Components Notes

elasticsearch components

apm server

running an apm-server for testing purposes in your local machine (here is mac) $GOPATH/bin/apm-server run -v -e -c ~/citrix/testing-apm/apm-server.yml -E apm-server.expvar.enabled=true

config:

https://www.elastic.co/guide/en/apm/server/current/configuration-monitor.html#_bulk_max_size_6 https://www.elastic.co/guide/en/apm/server/current/elasticsearch-output.html https://www.elastic.co/guide/en/apm/server/current/apm-server-configuration.html https://www.elastic.co/guide/en/apm/server/current/running-on-docker.html

troubleshooting

https://www.elastic.co/guide/en/apm/server/current/common-problems.html https://www.elastic.co/guide/en/apm/server/current/common-problems.html#queue-full https://www.elastic.co/guide/en/apm/server/current/common-problems.html#request-timed-out https://www.elastic.co/guide/en/apm/server/master/common-problems.html#io-timeout

sizing:

https://www.elastic.co/guide/en/apm/server/current/sizing-guide.html https://www.elastic.co/guide/en/apm/server/current/processing-performance.html https://www.elastic.co/guide/en/apm/server/current/tune-apm-server.html https://www.elastic.co/guide/en/apm/get-started/7.6/transaction-spans.html

testing/stressing:

https://github.com/elastic/hey-apm https://github.com/elastic/apm-server/issues/1414

agent:

https://www.elastic.co/guide/en/apm/agent/python/4.x/configuration.html

test an apm server

Make 2 files for running the server and the hey-apm benchmarking tool for it

Read more →

Partition From Xen Instance

How to mount partition from xen instance

This below describes the way to mount an LVM partition that exists within a partition from a multi-partition disk image.

Let assume our image is called System.img

We will need losetup, kpartx and vgscan,vgchange commands.

With losetup -f you will identify free loopback devices. let say this is loop6.

  1. losetup /dev/loop6 ./System.img
    

This will mount the disk image in the loop device.

Read more →