Compare commits

...

3 Commits

Author SHA1 Message Date
Andrei Kvapil
1b0e2e831c Enable leader election for Cozystack 2024-02-19 14:16:01 +01:00
Andrei Kvapil
df47d2f4a6 Change tag for matchbox image (#15)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-02-17 19:11:09 +01:00
Andrei Kvapil
c0aea5a106 Add Adopters, Code of Conduct, Contributing, and Maintainers guides (#14)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-02-17 17:53:49 +01:00
9 changed files with 117 additions and 9 deletions

28
ADOPTERS.md Normal file
View File

@@ -0,0 +1,28 @@
# Adopters
Below you can find a list of organizations and users who have agreed to
tell the world that they are using Cozystack in a production environment.
The goal of this list is to inspire others to do the same and to grow
this open source community and project.
Please add your organization to this list. It takes 5 minutes of your time,
but it means a lot to us.
## Updating this list
To add your organization to this list, you can either:
- [open a pull request](https://github.com/aenix-io/cozystack/pulls) to directly update this file, or
- [edit this file](https://github.com/aenix-io/cozystack/blob/main/ADOPTERS.md) directly in GitHub
Feel free to ask in the Slack chat if you any questions and/or require
assistance with updating this list.
## Cozystack Adopters
This list is sorted in chronological order, based on the submission date.
| Organization | Contact | Date | Description of Use |
| ------------ | ------- | ---- | ------------------ |
| [Ænix](https://aenix.io/) | @kvaps | 2024-02-14 | Ænix provides consulting services for cloud providers and uses Cozystack as the main tool for organizing managed services for them. |

3
CODE_OF_CONDUCT.md Normal file
View File

@@ -0,0 +1,3 @@
# Code of Conduct
Cozystack follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).

45
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,45 @@
# Contributing to Cozystack
Welcome! We are glad that you want to contribute to our Cozystack project! 💖
As you get started, you are in the best position to give us feedbacks on areas of our project that we need help with, including:
* Problems found while setting up the development environment
* Gaps in our documentation
* Bugs in our Github actions
First, though, it is important that you read the [code of conduct](CODE_OF_CONDUCT.md).
The guidelines below are a starting point. We don't want to limit your
creativity, passion, and initiative. If you think there's a better way, please
feel free to bring it up in a Github discussion, or open a pull request. We're
certain there are always better ways to do things, we just need to start some
constructive dialogue!
## Ways to contribute
We welcome many types of contributions including:
* New features
* Builds, CI/CD
* Bug fixes
* [Documentation](https://github.com/aenix-io/cozystack-website/tree/main)
* Issue Triage
* Answering questions on Slack or Github Discussions
* Web design
* Communications / Social Media / Blog Posts
* Events participation
* Release management
## Ask for Help
The best way to reach us with a question when contributing is to drop a line in
our [Telegram channel](https://t.me/cozystack), or start a new Github discussion.
## Raising Issues
When raising issues, please specify the following:
- A scenario where the issue occurred (with details on how to reproduce it)
- Errors and log messages that are displayed by the involved software
- Any other detail that might be useful

7
MAINTAINERS.md Normal file
View File

@@ -0,0 +1,7 @@
# The Cozystack Maintainers
| Maintainer | GitHub Username | Company |
| ---------- | --------------- | ------- |
| Andrei Kvapil | [@kvaps](https://github.com/kvaps) | Ænix |
| George Gaál | [@gecube](https://github.com/gecube) | Ænix |
| Eduard Generalov | [@egeneralov](https://github.com/egeneralov) | Ænix |

View File

@@ -99,7 +99,7 @@ Any Linux system installed on it (eg. Ubuntu should be enough)
Start matchbox with prebuilt Talos image for Cozystack:
```bash
sudo docker run --name=matchbox -d --net=host ghcr.io/aenix-io/cozystack/matchbox:v0.0.2 \
sudo docker run --name=matchbox -d --net=host ghcr.io/aenix-io/cozystack/matchbox:v1.6.4 \
-address=:8080 \
-log-level=debug
```

View File

@@ -12,7 +12,7 @@ talos_version=$(awk '/^version:/ {print $2}' packages/core/installer/images/talo
set -x
sed -i "s|\(ghcr.io/aenix-io/cozystack/matchbox:\)v[^ ]\+|\1${version}|g" README.md
sed -i "s|\(ghcr.io/aenix-io/cozystack/matchbox:\)v[^ ]\+|\1${talos_version}|g" README.md
sed -i "s|\(ghcr.io/aenix-io/cozystack/talos:\)v[^ ]\+|\1${talos_version}|g" README.md
sed -i "/^TAG / s|=.*|= ${version}|" \

View File

@@ -24,12 +24,13 @@ image-installer:
docker buildx build -f images/installer/Dockerfile ../../.. \
--provenance false \
--tag $(REGISTRY)/installer:$(TAG) \
--cache-from type=registry,ref=$(REGISTRY)/installer:$(TAG) \
--tag $(REGISTRY)/installer:$(TALOS_VERSION)-$(TAG) \
--cache-from type=registry,ref=$(REGISTRY)/installer:$(TALOS_VERSION) \
--cache-to type=inline \
--metadata-file images/installer.json \
--push=$(PUSH) \
--load=$(LOAD)
echo "$(REGISTRY)/installer:$(TAG)" > images/installer.tag
echo "$(REGISTRY)/installer:$(TALOS_VERSION)" > images/installer.tag
image-talos:
test -f ../../../_out/assets/installer-amd64.tar || make talos-installer
@@ -43,12 +44,13 @@ image-matchbox:
docker buildx build -f images/matchbox/Dockerfile ../../.. \
--provenance false \
--tag $(REGISTRY)/matchbox:$(TAG) \
--cache-from type=registry,ref=$(REGISTRY)/matchbox:$(TAG) \
--tag $(REGISTRY)/matchbox:$(TALOS_VERSION)-$(TAG) \
--cache-from type=registry,ref=$(REGISTRY)/matchbox:$(TALOS_VERSION) \
--cache-to type=inline \
--metadata-file images/matchbox.json \
--push=$(PUSH) \
--load=$(LOAD)
echo "$(REGISTRY)/matchbox:$(TAG)" > images/matchbox.tag
echo "$(REGISTRY)/matchbox:$(TALOS_VERSION)" > images/matchbox.tag
assets: talos-iso

View File

@@ -1,3 +1,15 @@
FROM golang:alpine3.19 as k8s-await-election-builder
ARG K8S_AWAIT_ELECTION_GITREPO=https://github.com/LINBIT/k8s-await-election
ARG K8S_AWAIT_ELECTION_VERSION=0.4.1
RUN apk add --no-cache git make
RUN git clone ${K8S_AWAIT_ELECTION_GITREPO} /usr/local/go/k8s-await-election/ \
&& cd /usr/local/go/k8s-await-election \
&& git reset --hard v${K8S_AWAIT_ELECTION_VERSION} \
&& make \
&& mv ./out/k8s-await-election-amd64 /k8s-await-election
FROM alpine:3.19 AS builder
RUN apk add --no-cache make git
@@ -18,7 +30,8 @@ COPY scripts /cozystack/scripts
COPY --from=builder /src/packages/core /cozystack/packages/core
COPY --from=builder /src/packages/system /cozystack/packages/system
COPY --from=builder /src/_out/repos /cozystack/assets/repos
COPY --from=k8s-await-election-builder /k8s-await-election /usr/bin/k8s-await-election
COPY dashboards /cozystack/assets/dashboards
WORKDIR /cozystack
ENTRYPOINT [ "/cozystack/scripts/installer.sh" ]
ENTRYPOINT ["/usr/bin/k8s-await-election", "/cozystack/scripts/installer.sh" ]

View File

@@ -41,8 +41,6 @@ spec:
selector:
matchLabels:
app: cozystack
strategy:
type: Recreate
template:
metadata:
labels:
@@ -58,6 +56,18 @@ spec:
value: localhost
- name: KUBERNETES_SERVICE_PORT
value: "7445"
- name: K8S_AWAIT_ELECTION_ENABLED
value: "1"
- name: K8S_AWAIT_ELECTION_NAME
value: cozystack
- name: K8S_AWAIT_ELECTION_LOCK_NAME
value: cozystack
- name: K8S_AWAIT_ELECTION_LOCK_NAMESPACE
value: cozy-system
- name: K8S_AWAIT_ELECTION_IDENTITY
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: darkhttpd
image: "{{ .Files.Get "images/installer.tag" | trim }}@{{ index (.Files.Get "images/installer.json" | fromJson) "containerimage.digest" }}"
command: