This document summarizes a microservices meetup hosted by @mosa_siru. Key points include:
1. @mosa_siru is an engineer at DeNA and CTO of Gunosy.
2. The meetup covered Gunosy's architecture with over 45 GitHub repositories, 30 stacks, 10 Go APIs, and 10 Python batch processes using AWS services like Kinesis, Lambda, SQS and API Gateway.
3. Challenges discussed were managing 30 microservices, ensuring API latency below 50ms across availability zones, and handling 10 requests per second with nginx load balancing across 20 servers.
This document discusses messaging queues and platforms. It begins with an introduction to messaging queues and their core components. It then provides a table comparing 8 popular open source messaging platforms: Apache Kafka, ActiveMQ, RabbitMQ, NATS, NSQ, Redis, ZeroMQ, and Nanomsg. The document discusses using Apache Kafka for streaming and integration with Google Pub/Sub, Dataflow, and BigQuery. It also covers benchmark testing of these platforms, comparing throughput and latency. Finally, it emphasizes that messaging queues can help applications by allowing producers and consumers to communicate asynchronously.
This document discusses messaging queues and platforms. It begins with an introduction to messaging queues and their core components. It then provides a table comparing 8 popular open source messaging platforms: Apache Kafka, ActiveMQ, RabbitMQ, NATS, NSQ, Redis, ZeroMQ, and Nanomsg. The document discusses using Apache Kafka for streaming and integration with Google Pub/Sub, Dataflow, and BigQuery. It also covers benchmark testing of these platforms, comparing throughput and latency. Finally, it emphasizes that messaging queues can help applications by allowing producers and consumers to communicate asynchronously.
20250403 [KubeCon EU] containerd - Project Update and Deep Dive.pdfAkihiro Suda
Join containerd maintainers for an update and deep dive into the latest developments in containerd. This panel will feature discussion of the launch and adoption of containerd 2.0, what’s next in 2.1, 1.7’s transition into Extended support, and how LTS is going with 1.6. Topics will also include how the containerd project is involved with the KEP process and highlight how the broader cloud native ecosystem is enhanced through extension points in containerd and subprojects like runwasi.
https://sched.co/1td0k
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...Akihiro Suda
Rootless mode is a technique to harden containers by running the container engine as a non-root user. The support for rootless mode has been merged into Docker since v19.03 (2019) and in Kubernetes since v1.22 (2021). However, setting up Rootless Kubernetes has been more challenging than setting up Rootless Docker due to its complexity. This session presents Usernetes Generation 2, a Kubernetes distribution that wraps Kubernetes in Rootless Docker for ease of setting up multi-node Rootless Kubernetes clusters. Unlike the original Usernetes (Generation 1) that was based on "Kubernetes The Hard Way", Usernetes Generation 2 supports kubeadm. Usernetes Generation 2 is similar to `kind` and `minikube`, however, unlike them Usernetes Generation 2 supports forming real multi-node clusters using Flannel (VXLAN) and it can be potentially used for production clusters. https://github.com/rootless-containers/usernetes
20240321 [KubeCon EU Pavilion] Lima.pdf_Akihiro Suda
Lima is a tool for running Linux virtual machines and containers on macOS. It provides automatic host filesystem sharing, port forwarding, and integration with container runtimes like Docker and Kubernetes. Users can launch preconfigured Linux distro and container engine templates with a single command.
20240320 [KubeCon EU Pavilion] containerd.pdfAkihiro Suda
An industry-standard container runtime that is graduated by the CNCF and adopted by major Kubernetes services and distributions. It is designed to be pluggable and support new features through plugins like remote snapshotters and WASM runtimes. It provides plugins for runtimes like runc and runhcs, snapshotters like overlayfs and btrfs, and tools like nerdctl and containerd v2.0 which focus on cleaning up deprecated features and improving user namespace support.
20240201 [HPC Containers] Rootless Containers.pdfAkihiro Suda
Rootless containers put the container runtime in a user namespace to limit privileges. This improves security by preventing access to other users' files, ability to modify the kernel or firmware. Rootless containers have been supported by container runtimes since 2014 and are useful for shared computing environments. Key aspects include user namespaces remap UIDs to limit privileges to inside namespaces, and networking solutions like slirp4netns or bypass4netns to provide networking without privileges. Rootless Kubernetes called Usernetes allows running Kubernetes without root privileges and supports multi-node clusters.
[Podman Special Event] Kubernetes in Rootless PodmanAkihiro Suda
- Kubernetes can run in rootless containers using techniques like Podman, Docker, and containerd which map the root user inside containers to a non-root user on the host for improved security.
- Popular ways to run rootless Kubernetes include kind, minikube wrapped in Podman containers, and Usernetes which supports real multi-node clusters across multiple hosts using networking like Flannel.
- Future work includes promoting the "KubeletInUserNamespace" feature flag and eliminating overhead of user-mode TCP/IP for containers to improve the rootless Kubernetes experience.
Lima is a tool for running Linux virtual machines on macOS to run containers. It provides automatic host filesystem sharing, port forwarding, and integration with container runtimes like Docker and Kubernetes. It uses QEMU or macOS's Virtualization.framework as the hypervisor and supports networking and filesystem options like sshfs, virtio-9p-pci, and virtiofs. It includes templates for common Linux distros and container engines that can be launched with a single command.
Containerd is a CNCF graduated, open source container runtime with many enterprise users. It uses plugins to support features like remote images, WASM runtimes, and different OSes. The runtime provides snapshotters for storage like overlayfs and btrfs, and runtime plugins for Linux, Windows, FreeBSD and WASM. Nerdctl is a container CLI similar to Docker but optimized for Containerd experiments. Recent updates include sandboxing for "pauseless" pods and image transfer APIs, with a focus on cleaning deprecated features and improving user namespaces in upcoming versions.
https://github.com/rootless-containers/usernetes
Usernetes (Gen2) deploys a Kubernetes cluster inside Rootless Docker, so as to mitigate potential container-breakout vulnerabilities.
Usernetes (Gen2) is similar to Rootless kind and Rootless minikube, but Usernetes (Gen 2) supports creating a cluster with multiple hosts.
[DockerCon 2023] Reproducible builds with BuildKit for software supply chain ...Akihiro Suda
Images maintained by a reputable organization or an individual are often considered to be trustworthy; however, it is hard to deny the possibility that they might have silently injected malicious codes that are not present in the source repo. Also, even if they have no malicious intent, their images can still be compromised on an accidental leakage of registry credentials.
The latest release of BuildKit solves this supply chain security concern with reproducible builds. Reproducible builds is a technique to ensure that a bit-for-bit identical image can be reproduced from its source code, by anybody, at any time. When multiple actors can attest to an image's reproducibility, it signifies that the image contains no code of a secret origin.
Audiences of this talk will learn how they can and how sometimes they cannot make their images reproducible to improve their trust.
The internals and the latest trends of container runtimesAkihiro Suda
The document discusses the internals and latest trends of container runtimes. It describes how container runtimes like Docker use kernel features like namespaces and cgroups to isolate containers. It explains how containerd and runc work together to manage the lifecycles of container processes. It also covers security measures like capabilities, AppArmor, and SELinux that container runtimes employ to safeguard the host system.
This document summarizes Lima, an open-source tool for running Linux virtual machines and containers on macOS. Lima provides automatic host filesystem sharing and port forwarding, and integrates with container engines like Docker and container orchestrators like Kubernetes. It uses QEMU or macOS's Virtualization.framework as the hypervisor and supports networking and storage drivers. Templates are provided for common Linux distributions and container tools.
An industry-standard container runtime that is graduated by the CNCF since 2019 and adopted by major Kubernetes services and distributions. It is designed to be pluggable to support new features like remote snapshotting and WASM runtimes. Containerd provides plugins for snapshotting storage backends, runtimes for different operating systems, and tools like nerdctl for experimenting with new containerd capabilities. Upcoming versions will focus on cleaning deprecated features and improving APIs for image transfer and user namespaces.
23. TLSを用いたDockerソケットの保護
23
TLSの設定方法: https://docs.docker.com/engine/security/https/
$ openssl genrsa -aes256 -out ca-key.pem 4096
Generating RSA private key, 4096 bit long modulus
..................................................................
..................................................................
........................................................++
........++
e is 65537 (0x10001)
Enter pass phrase for ca-key.pem:
Verifying - Enter pass phrase for ca-key.pem:
$ openssl req -new -x509 -days 365 -key ca-key.pem -sha256 out
ca.pem
Enter pass phrase for ca-key.pem:
You are about to be asked to enter information that will be
incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name
or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:
State or Province Name (full name) [Some-State]:Queensland
Locality Name (eg, city) []:Brisbane
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Docker
Inc
Organizational Unit Name (eg, section) []:Sales
Common Name (e.g. server FQDN or YOUR name) []:$HOST
Email Address []:[email protected]
$ openssl genrsa -out server-key.pem 4096
Generating RSA private key, 4096 bit long modulus
.............................
........................................++
....................................
.............................................................++
e is 65537 (0x10001)
$ openssl req -subj "/CN=$HOST" -sha256 -new -key server-key.pem
-out server.csr
$ echo subjectAltName = DNS:$HOST,IP:10.10.10.20,IP:127.0.0.1 >>
extfile.cnf
$ echo extendedKeyUsage = serverAuth >> extfile.cnf
$ openssl x509 -req -days 365 -sha256 -in server.csr -CA ca.pem
-CAkey ca-key.pem -CAcreateserial -out server-cert.pem -extfile
extfile.cnf
Signature ok subject=/CN=your.host.com
Getting CA Private Key
Enter pass phrase for ca-key.pem:
$ openssl genrsa -out key.pem 4096
Generating RSA private key, 4096 bit long modulus
.........................................................++
................++
e is 65537 (0x10001)
$ openssl req -subj '/CN=client' -new -key key.pem -out client.csr
$ echo extendedKeyUsage = clientAuth >> extfile.cnf
$ openssl x509 -req -days 365 -sha256 -in client.csr -CA ca.pem
-CAkey ca-key.pem -CAcreateserial -out cert.pem -extfile
extfile.cnf
Signature ok
subject=/CN=client
Getting CA Private Key
Enter pass phrase for ca-key.pem:
$ rm -v client.csr server.csr
$ chmod -v 0400 ca-key.pem key.pem server-key.pem
$ chmod -v 0444 ca.pem server-cert.pem cert.pem
$ dockerd --tlsverify --tlscacert=ca.pem --tlscert=server-cert.pem
--tlskey=server-key.pem -H=0.0.0.0:2376
$ docker --tlsverify --tlscacert=ca.pem --tlscert=cert.pem
--tlskey=key.pem -H=$HOST:2376 version
出典: 上記URL
24. TLSを用いたDockerソケットの保護
24
TLSの設定方法: https://docs.docker.com/engine/security/https/
$ openssl genrsa -aes256 -out ca-key.pem 4096
Generating RSA private key, 4096 bit long modulus
..................................................................
..................................................................
........................................................++
........++
e is 65537 (0x10001)
Enter pass phrase for ca-key.pem:
Verifying - Enter pass phrase for ca-key.pem:
$ openssl req -new -x509 -days 365 -key ca-key.pem -sha256 out
ca.pem
Enter pass phrase for ca-key.pem:
You are about to be asked to enter information that will be
incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name
or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:
State or Province Name (full name) [Some-State]:Queensland
Locality Name (eg, city) []:Brisbane
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Docker
Inc
Organizational Unit Name (eg, section) []:Sales
Common Name (e.g. server FQDN or YOUR name) []:$HOST
Email Address []:[email protected]
$ openssl genrsa -out server-key.pem 4096
Generating RSA private key, 4096 bit long modulus
.............................
........................................++
....................................
.............................................................++
e is 65537 (0x10001)
$ openssl req -subj "/CN=$HOST" -sha256 -new -key server-key.pem
-out server.csr
$ echo subjectAltName = DNS:$HOST,IP:10.10.10.20,IP:127.0.0.1 >>
extfile.cnf
$ echo extendedKeyUsage = serverAuth >> extfile.cnf
$ openssl x509 -req -days 365 -sha256 -in server.csr -CA ca.pem
-CAkey ca-key.pem -CAcreateserial -out server-cert.pem -extfile
extfile.cnf
Signature ok subject=/CN=your.host.com
Getting CA Private Key
Enter pass phrase for ca-key.pem:
$ openssl genrsa -out key.pem 4096
Generating RSA private key, 4096 bit long modulus
.........................................................++
................++
e is 65537 (0x10001)
$ openssl req -subj '/CN=client' -new -key key.pem -out client.csr
$ echo extendedKeyUsage = clientAuth >> extfile.cnf
$ openssl x509 -req -days 365 -sha256 -in client.csr -CA ca.pem
-CAkey ca-key.pem -CAcreateserial -out cert.pem -extfile
extfile.cnf
Signature ok
subject=/CN=client
Getting CA Private Key
Enter pass phrase for ca-key.pem:
$ rm -v client.csr server.csr
$ chmod -v 0400 ca-key.pem key.pem server-key.pem
$ chmod -v 0444 ca.pem server-cert.pem cert.pem
$ dockerd --tlsverify --tlscacert=ca.pem --tlscert=server-cert.pem
--tlskey=server-key.pem -H=0.0.0.0:2376
$ docker --tlsverify --tlscacert=ca.pem --tlscert=cert.pem
--tlskey=key.pem -H=$HOST:2376 version
出典: 上記URL