melezhik

joined 3 years ago
[–] melezhik@programming.dev 2 points 1 day ago* (last edited 1 day ago) (1 children)

But now when you have a YAML program as the first level abstraction how do you handle results between those multi language calls ? In DSCI this is achieved via states and normal functions , and everting is just a function on general purpose programming language, in YAML you need all these magic ( awkward ) YAML syntax to mimic all those things ( pass parameters , handle global variables , process user input , handle returned parameters , etc )

[–] melezhik@programming.dev 1 points 1 day ago* (last edited 1 day ago)

If you use tools gluing them into YAML - you get YAML bloated with time . When you say those tools already having Python - excellent I would like to use those Python libs or SDK directly in my Python code instead of juggling those tools as cli or code blocks inside YAML

UPDATE: and yeah , re-read again - I guess the most of automation is done today via “CI” pipelines even when those are not meant to be CI only, like you said … anyways the rest I have said stands true for me … don’t bake your code into YAML )

[–] melezhik@programming.dev 2 points 1 day ago* (last edited 1 day ago)

The issues you had just proves that YAML based CI approach always leads to troubles with time. And yeah, I have been there, code generators for YAML. Hundreds of lines for YAML pipelines, etc ))

It allows the CI engine to determine which jobs to start, what their steps are etc.

Yep, like a said , I don't mind to have such a configuration inside YAML, but this should NOT be pipeline code itself )

[–] melezhik@programming.dev 2 points 1 day ago* (last edited 1 day ago) (2 children)

... put those in separate scripts and call them from the YAML.

This is exactly what I try to avoid, cause:

  1. many people (in my experience ) even don't bother refactoring YAML spaghetti code to separate scripts and we end up unmaintainable codebase

  2. and even if one has to do such a refactoring what is the point of using YAML at all ?

All I need just a collection of tasks/jobs written on languages of choice and I don't need YAML "programming" language at all )

PS And btw I don't mind having a minimal amount of YAML as configuration layer and this is what is presented in DSCI, but only minimal ))

[–] melezhik@programming.dev 2 points 1 day ago* (last edited 1 day ago) (2 children)

it's just because I think in real world we have a lot of tasks where state is required or extremely beneficial, some examples on top of my head:

  • creation of virtual machines with dynamic IP addresses
  • creation of bug tracking system tickets with unique ticket IDs
  • looking up in databases where fetched records have unique IDs

etc

[–] melezhik@programming.dev 1 points 1 day ago* (last edited 1 day ago) (4 children)

Ok, try to do it on GH actions, share states between tasks/jobs for example:

tasks/task_one/task.py

#!/usr/bin/python3

update_state({
  'out1' : 'out1 value',
  'out2' : 'out2 value'
})

tasks/task_two/task.py

#!/usr/bin/python3

dict = get_state()
print(dict["out1"])
print(dict["out2"])

Or share states between jobs:

jobs/job1/task.py

#!/usr/bin/python3

update_state({
  'out1' : 'out1 value',
  'out2' : 'out2 value'
})

jobs/job2/task.py

#!/usr/bin/python3

dict = config()

print(dict["_dsci_"]["job1"]["out1"])
print(dict["_dsci_"]["job1"]["out2"])

I can't imagine how much boilerplate code (if this ever possible ) one needs to write to achieve that on YAML based pipelines (GH Actions/ etc)

And don't tell me about jobs artifacts ))

UPDATE:

Another good example is to run tasks conditionally, yes using old good if:

#!/usr/bin/python3

if some_condition(foo, bar): 
    run_task(
       'task1', {
          'foo' : 'foo value',
          'bar' : 'bar value'
       }
    )

The same could be quite awkward in YAML based code

[–] melezhik@programming.dev 2 points 1 day ago* (last edited 1 day ago) (4 children)

Only as high level glue , main logic is just normal programming languages - see here https://github.com/melezhik/DSCI/tree/main/examples

[–] melezhik@programming.dev 2 points 1 day ago* (last edited 1 day ago) (3 children)

Here is SDK for those languages:

Raku Perl Bash Python Ruby Powershell Php Golang

UPDATE: so it's not just hitting up a language from a pipeline , it's full reach SDK, one writes a pipeline on a language, if I get your comment correctly

 

DSCI is simple yet super flexible pipeline engine to write CI code on regular programming languages, integrates with Forgejo using web hooks. Intended for small teams hosting Forgejo on single VM VPS and willing to create pipelines on regular programming languages

[–] melezhik@programming.dev 4 points 1 week ago

GH project link - https://github.com/melezhik/doubletap for ones who are curious

 

DTAP protocol is a lightweight testing protocol allowing to validate Linux infrastructure at ease. Here is a code example of how one can check that their Rocky Linux VM is secure enough (more Linux distributions are easy to check the same way).

[–] melezhik@programming.dev 1 points 2 weeks ago

Typo )) sorry , meant password less

[–] melezhik@programming.dev 1 points 2 weeks ago* (last edited 2 weeks ago) (3 children)

This seems, at best, some general security checks but not mapped to any framework in particular.

So. Yes. Ssh access should be passwords only, etc. Some common sense. We don’t need standard to that

UPDATE: sorry for the typo, meant passwordless

 

Some times ago I posted about scc tool, here is a short update with some example reports provided. https://dev.to/melezhik/linux-compliance-checks-with-sparrow-plugin-2160

People can use the plugin to check if their Linux configuration files are security compliant

Sparrow is a Raku automation framework

 

Scc is a sparrow plugin that could be run over terminal to check security best practice of your Linux conf files :

  • sshd
  • sudoers
  • bind
  • redis
  • sysctl

more services are coming , check it out and let me know what you think https://github.com/melezhik/sparrow-plugins/tree/master/scc

 

Dead simple ci is yamless pipeline engine for gitea/forgejo (using web hooks mechanism). Allowing one to write pipeline in general programming language. DSCI provides SDK allow to write extensions for the engine, the same way using general programming languages . This is an introduction - https://deadsimpleci.sparrowhub.io/doc/bash-plugins with simple examples on Bash and Python, but enough to get started ...

15
submitted 5 months ago* (last edited 5 months ago) by melezhik@programming.dev to c/programming@programming.dev
 

Introduction into Dead Simple CI framework for ci pipelines automation.

https://dev.to/melezhik/dead-simple-ci-introduction-1jh6

5
Dsci runner migrated to golang (deadsimpleci.sparrowhub.io)
submitted 5 months ago* (last edited 5 months ago) by melezhik@programming.dev to c/show_and_tell@programming.dev
 

Hey everyone! After week of work finally rewrote dsci runner on golang.

git clone https://github.com/melezhik/dsci-runner.git cd dsci-runner go mod tidy go build -o dsci_runner main.go ./dsci_runner

That means just a single binary install Check it out ! )

Forgejo integrations details are here - http://deadsimpleci.sparrowhub.io/doc/forgejo-setup

 

Hey everyone! After week of work finally rewrote dsci runner on golang.

git clone https://github.com/melezhik/dsci-runner.git cd dsci-runner go mod tidy go build -o dsci_runner main.go ./dsci_runner

That means just a single binary install Check it out ! )

Forgejo integrations details are here - http://deadsimpleci.sparrowhub.io/doc/forgejo-setup

 

Hey everyone! After week of work finally rewrote dsci runner on golang.

git clone https://github.com/melezhik/dsci-runner.git cd dsci-runner go mod tidy go build -o dsci_runner main.go ./dsci_runner

That means just a single binary install Check it out ! )

Forgejo integrations details are here - http://deadsimpleci.sparrowhub.io/doc/forgejo-setup

16
Dead Simple CI - looking for beta testers (deadsimpleci.sparrowhub.io)
submitted 6 months ago* (last edited 6 months ago) by melezhik@programming.dev to c/show_and_tell@programming.dev
 

Hey! I am building a brand new CI based on top of forgejo/gitea - the thing is to use general purpose programming languages instead of YAML for pipelines. So I have launched a forgejo instance with DSCI runner integrated, where you can find some example pipelines for demo projects - http://forgejo.sparrowhub.io/root

So I am looking for beta testers, anyone who wants to try out the dsci - please let me know - so I will create an account for you ( you may find the link to the discord channel at the web site ) and you will start to create and run pipelines for projects you like

20
Dead Simple CI (deadsimpleci.sparrowhub.io)
submitted 6 months ago* (last edited 6 months ago) by melezhik@programming.dev to c/programming@programming.dev
 

Dead simple CI - http://deadsimpleci.sparrowhub.io/ could be thought as an extension to any modern CI system - GitHub/Gitea/Gitlab/Forgejo/you name it , adding to default pipeline mechanism (usually based on yaml) the convenient for programmers use of general programming languages, it uses web hooks and commit statues API to report results back to native CI

 

Double TAP is lightweight testing framework where users write black box tests as rules checking output from tested "boxes". Boxes could be anything from http client, web server to messages in syslog. This universal approach allows to test anything with just dropping text rules describing system behavior in black box manner.

Rules are written in formal DSL and could be extended on many programming languages

Tool aims to help with infrastructure audit and testing as well as with validating development environments

view more: next ›