Skip to content

Commit

Permalink
Merge branch 'mymaster' into upstream/4.0.0-rc1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
fopina authored Sep 16, 2024
2 parents ebcb366 + 060a046 commit 4ff9416
Show file tree
Hide file tree
Showing 7 changed files with 114 additions and 281 deletions.
11 changes: 0 additions & 11 deletions .github/dependabot.yml

This file was deleted.

139 changes: 4 additions & 135 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ release:
prerelease: auto

env:
- IMAGE_PREFIX={{ if index .Env "IMAGE_PREFIX" }}{{ .Env.IMAGE_PREFIX }}{{ else }}dkron{{ end }}
- IMAGE_PREFIX={{ if index .Env "IMAGE_PREFIX" }}{{ .Env.IMAGE_PREFIX }}{{ else }}fopina{{ end }}

builds:
- &xbuild
Expand All @@ -14,8 +14,8 @@ builds:
env:
- CGO_ENABLED=0
goos:
- freebsd
- windows
# - freebsd
# - windows
- darwin
- linux
goarch:
Expand All @@ -27,129 +27,10 @@ builds:
ldflags:
- -s -w -X github.com/distribworks/dkron/v4/dkron.Version={{.Version}} -X github.com/distribworks/dkron/v4/dkron.Codename=Abaniko

- <<: *xbuild
main: ./builtin/bins/dkron-executor-rabbitmq/
id: dkron-executor-rabbitmq
binary: dkron-executor-rabbitmq

- <<: *xbuild
main: ./builtin/bins/dkron-executor-nats/
id: dkron-executor-nats
binary: dkron-executor-nats

- <<: *xbuild
main: ./builtin/bins/dkron-executor-kafka/
id: dkron-executor-kafka
binary: dkron-executor-kafka

- <<: *xbuild
main: ./builtin/bins/dkron-executor-gcppubsub/
id: dkron-executor-gcppubsub
binary: dkron-executor-gcppubsub

- <<: *xbuild
main: ./builtin/bins/dkron-executor-grpc/
id: dkron-executor-grpc
binary: dkron-executor-grpc

- <<: *xbuild
main: ./builtin/bins/dkron-processor-files/
id: dkron-processor-files
binary: dkron-processor-files

- <<: *xbuild
main: ./builtin/bins/dkron-processor-log/
id: dkron-processor-log
binary: dkron-processor-log

- <<: *xbuild
main: ./builtin/bins/dkron-processor-syslog/
id: dkron-processor-syslog
binary: dkron-processor-syslog

- <<: *xbuild
main: ./builtin/bins/dkron-processor-fluent/
id: dkron-processor-fluent
binary: dkron-processor-fluent

nfpms:
-
vendor: Distributed Works
homepage: https://dkron.io
maintainer: Victor Castell <[email protected]>
description: Distributed, fault tolerant job scheduling system
license: LGPL 3.0

formats:
- deb
- rpm

conflicts:
- dkron-pro
replaces:
- dkron-pro

# Override default /usr/local/bin destination for binaries
bindir: /usr/bin

#files:
# "builder/files/": "/etc/init.d"
# "path/**/glob": "/var/foo/glob"
contents:
- src: builder/files/dkron.yml
dst: /etc/dkron/dkron.yml
type: config
- src: builder/files/dkron.service
dst: /lib/systemd/system/dkron.service
type: config
- dst: /var/log/dkron
type: dir

snapshot:
name_template: "{{ .Tag }}-next"

dockers:
- image_templates:
- "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}:{{ .Version }}-amd64"
dockerfile: Dockerfile.release
use: buildx
goos: linux
goarch: amd64
ids: &docker-ids
- dkron
- dkron-executor-rabbitmq
- dkron-executor-nats
- dkron-executor-kafka
- dkron-executor-gcppubsub
- dkron-executor-grpc
- dkron-processor-files
- dkron-processor-log
- dkron-processor-syslog
- dkron-processor-fluent
build_flag_templates:
- --platform=linux/amd64

- image_templates:
- "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}:{{ .Version }}-arm64"
dockerfile: Dockerfile.release
use: buildx
goos: linux
goarch: arm64
ids: *docker-ids
build_flag_templates:
- --platform=linux/arm64/v8

- image_templates:
- "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}:{{ .Version }}-armv7"
dockerfile: Dockerfile.release
use: buildx
goos: linux
goarch: arm
goarm: '7'
ids: *docker-ids
build_flag_templates:
- --platform=linux/arm/v7

- image_templates:
- "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}:{{ .Version }}-light-amd64"
dockerfile: Dockerfile.release
Expand Down Expand Up @@ -183,18 +64,6 @@ dockers:
- --platform=linux/arm/v7

docker_manifests:
- name_template: "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}:{{ .Version }}"
image_templates:
- "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}:{{ .Version }}-amd64"
- "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}:{{ .Version }}-arm64"
- "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}:{{ .Version }}-armv7"

- name_template: "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}:latest"
image_templates:
- "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}:{{ .Version }}-amd64"
- "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}:{{ .Version }}-arm64"
- "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}:{{ .Version }}-armv7"

- name_template: "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}:{{ .Version }}-light"
image_templates:
- "{{ .Env.IMAGE_PREFIX }}/{{ .ProjectName }}:{{ .Version }}-light-amd64"
Expand All @@ -213,4 +82,4 @@ changelog:
exclude:
- '^docs:'
- '^test:'
- '^Merge pull request'
- '^Merge pull request'
93 changes: 4 additions & 89 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,91 +1,6 @@
<p align="center">
<img width="400" src="docs/images/DKRON_STICKER_OK_CMYK_RGB_CONV_300.png" alt="Dkron" title="Dkron" />
</p>
# dkron fork

# Dkron - Distributed, fault tolerant job scheduling system for cloud native environments [![GoDoc](https://godoc.org/github.com/distribworks/dkron?status.svg)](https://godoc.org/github.com/distribworks/dkron) [![Actions Status](https://github.com/distribworks/dkron/workflows/Test/badge.svg)](https://github.com/distribworks/dkron/actions) [![Gitter](https://badges.gitter.im/distribworks/dkron.svg)](https://gitter.im/distribworks/dkron)

Website: http://dkron.io/

Dkron is a distributed cron service, easy to setup and fault tolerant with focus in:

- Easy: Easy to use with a great UI
- Reliable: Completely fault tolerant
- Highly scalable: Able to handle high volumes of scheduled jobs and thousands of nodes

Dkron is written in Go and leverage the power of the Raft protocol and Serf for providing fault tolerance, reliability and scalability while keeping simple and easily installable.

Dkron is inspired by the google whitepaper [Reliable Cron across the Planet](https://queue.acm.org/detail.cfm?id=2745840) and by Airbnb Chronos borrowing the same features from it.

Dkron runs on Linux, OSX and Windows. It can be used to run scheduled commands on a server cluster using any combination of servers for each job. It has no single points of failure due to the use of the Gossip protocol and fault tolerant distributed databases.

You can use Dkron to run the most important part of your company, scheduled jobs.

## Installation

[Installation instructions](https://dkron.io/docs/basics/installation)

Full, comprehensive documentation is viewable on the [Dkron website](http://dkron.io)

## Development Quick start

The best way to test and develop dkron is using docker, you will need [Docker](https://www.docker.com/) installed before proceeding.

Clone the repository.

Next, run the included Docker Compose config:

`docker-compose up`

This will start Dkron instances. To add more Dkron instances to the clusters:

```
docker-compose up --scale dkron-server=4
docker-compose up --scale dkron-agent=10
```

Check the port mapping using `docker-compose ps` and use the browser to navigate to the Dkron dashboard using one of the ports mapped by compose.

To add jobs to the system read the [API docs](https://dkron.io/api/).

## Frontend development

Dkron dashboard is built using [React Admin](https://marmelab.com/react-admin/) as a single page application.

To start developing the dashboard enter the `ui` directory and run `npm install` to get the frontend dependencies and then start the local server with `npm start` it should start a new local web server and open a new browser window serving de web ui.

Make your changes to the code, then run `make ui` to generate assets files. This is a method of embedding resources in Go applications.

### Resources

Chef cookbook
https://supermarket.chef.io/cookbooks/dkron

Python Client Library
https://github.com/oldmantaiter/pydkron

Ruby client
https://github.com/jobandtalent/dkron-rb

PHP client
https://github.com/gromo/dkron-php-adapter

Terraform provider
https://github.com/bozerkins/terraform-provider-dkron

Manage and run jobs in Dkron from your django project
https://github.com/surface-security/django-dkron

## Contributors

<a href="https://github.com/distribworks/dkron/graphs/contributors">
<img src="https://contrib.rocks/image?repo=distribworks/dkron" />
</a>

Made with [contrib.rocks](https://contrib.rocks).

## Get in touch

- Twitter: [@distribworks](https://twitter.com/distribworks)
- Chat: https://gitter.im/distribworks/dkron
- Email: victor at distrib.works
## Changes

* Workflow changes for the fork (no PR - maybe one in future using variables - "sexy & forkable")
* Hash scheduling (PR https://github.com/distribworks/dkron/pull/1260)
91 changes: 91 additions & 0 deletions README_upstream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<p align="center">
<img width="400" src="docs/images/DKRON_STICKER_OK_CMYK_RGB_CONV_300.png" alt="Dkron" title="Dkron" />
</p>

# Dkron - Distributed, fault tolerant job scheduling system for cloud native environments [![GoDoc](https://godoc.org/github.com/distribworks/dkron?status.svg)](https://godoc.org/github.com/distribworks/dkron) [![Actions Status](https://github.com/distribworks/dkron/workflows/Test/badge.svg)](https://github.com/distribworks/dkron/actions) [![Gitter](https://badges.gitter.im/distribworks/dkron.svg)](https://gitter.im/distribworks/dkron)

Website: http://dkron.io/

Dkron is a distributed cron service, easy to setup and fault tolerant with focus in:

- Easy: Easy to use with a great UI
- Reliable: Completely fault tolerant
- Highly scalable: Able to handle high volumes of scheduled jobs and thousands of nodes

Dkron is written in Go and leverage the power of the Raft protocol and Serf for providing fault tolerance, reliability and scalability while keeping simple and easily installable.

Dkron is inspired by the google whitepaper [Reliable Cron across the Planet](https://queue.acm.org/detail.cfm?id=2745840) and by Airbnb Chronos borrowing the same features from it.

Dkron runs on Linux, OSX and Windows. It can be used to run scheduled commands on a server cluster using any combination of servers for each job. It has no single points of failure due to the use of the Gossip protocol and fault tolerant distributed databases.

You can use Dkron to run the most important part of your company, scheduled jobs.

## Installation

[Installation instructions](https://dkron.io/docs/basics/installation)

Full, comprehensive documentation is viewable on the [Dkron website](http://dkron.io)

## Development Quick start

The best way to test and develop dkron is using docker, you will need [Docker](https://www.docker.com/) installed before proceeding.

Clone the repository.

Next, run the included Docker Compose config:

`docker-compose up`

This will start Dkron instances. To add more Dkron instances to the clusters:

```
docker-compose up --scale dkron-server=4
docker-compose up --scale dkron-agent=10
```

Check the port mapping using `docker-compose ps` and use the browser to navigate to the Dkron dashboard using one of the ports mapped by compose.

To add jobs to the system read the [API docs](https://dkron.io/api/).

## Frontend development

Dkron dashboard is built using [React Admin](https://marmelab.com/react-admin/) as a single page application.

To start developing the dashboard enter the `ui` directory and run `npm install` to get the frontend dependencies and then start the local server with `npm start` it should start a new local web server and open a new browser window serving de web ui.

Make your changes to the code, then run `make ui` to generate assets files. This is a method of embedding resources in Go applications.

### Resources

Chef cookbook
https://supermarket.chef.io/cookbooks/dkron

Python Client Library
https://github.com/oldmantaiter/pydkron

Ruby client
https://github.com/jobandtalent/dkron-rb

PHP client
https://github.com/gromo/dkron-php-adapter

Terraform provider
https://github.com/bozerkins/terraform-provider-dkron

Manage and run jobs in Dkron from your django project
https://github.com/surface-security/django-dkron

## Contributors

<a href="https://github.com/distribworks/dkron/graphs/contributors">
<img src="https://contrib.rocks/image?repo=distribworks/dkron" />
</a>

Made with [contrib.rocks](https://contrib.rocks).

## Get in touch

- Twitter: [@distribworks](https://twitter.com/distribworks)
- Chat: https://gitter.im/distribworks/dkron
- Email: victor at distrib.works

6 changes: 6 additions & 0 deletions cmd/plugins.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ func (p *Plugins) DiscoverPlugins() error {
p.Executors[pluginName] = raw.(dkplugin.Executor)
}

raw, err := p.pluginFactory(exePath, []string{"shell"}, dkplugin.ExecutorPluginName)
if err != nil {
return err
}
p.Executors["shell"] = raw.(dkplugin.Executor)

return nil
}

Expand Down
Loading

0 comments on commit 4ff9416

Please sign in to comment.