Commit Graph

34 Commits

Author SHA1 Message Date
R Tyler Croy 60e0b82247 Add a stub relational data service while I explore GraphQL
See #63
2021-03-03 22:04:25 -08:00
R Tyler Croy 127d3b7aa4 Refactor the parser code into its own crate for future development
This will inform #46
2020-11-28 21:42:48 -08:00
R Tyler Croy ee2510ed6f Refactor the source tree to separate local executables (CLIs) and models a bit more
This should make the compile cycles a little bit more sensible when just working
on the CLI components of the agent, for example.
2020-11-26 10:40:37 -08:00
R Tyler Croy 508346498d Add the stub for the local-orchestrator
See #41
2020-11-21 14:59:27 -08:00
R Tyler Croy 1b6ebdd3db Work in progress on the git step
See #32
2020-11-15 14:39:00 -08:00
R Tyler Croy 8404b6fca2 Move the parser into the services directory where it belongs
This commit also cleans up a lot of build warnings that were bugging me
2020-11-03 20:54:05 -08:00
R Tyler Croy 101ef3b7cc Refactor some common code out into the "models" module for sharing
This will be shared between the parser and the agent so that everybody has the
same views on what the pipeline data structure is
2020-11-02 21:35:59 -08:00
R Tyler Croy 5352cd3d11 Playing around with writing a grammar with pest
Giving up on ANTLR4 for now, pest looks promising though!
2020-11-01 21:04:05 -08:00
R Tyler Croy 56ffbaadb2 Implement the corresponding `unarchive` step to grab a pipeline's artifacts later on
This can be used to grab an archived artifact on another agent, for example.

Tested with:

  ---
  uuid: '2265b5d0-1f70-46de-bf50-f1050e9fac9a'

  contexts:
    - name: 'Prep'
      uuid: '3ce1f6fb-79ca-4564-a47e-98265f53ef7f'
      environment:
        CLOUD: 'yes'

    - name: 'Build'
      uuid: '5e9d4943-33e5-4945-8a97-a11421cb4b11'

  steps:
    - symbol: sh
      uuid: '2265b5d0-1f70-46de-bf50-f1050e9fac9a'
      context: '5e9d4943-33e5-4945-8a97-a11421cb4b11'
      parameters:
        script: 'echo "hello" > hello.log'

    - symbol: archive
      context: '5e9d4943-33e5-4945-8a97-a11421cb4b11'
      uuid: 'd479e450-9ada-4127-84ca-e0576d0c0c98'
      parameters:
        artifacts: 'hello.log'

    - symbol: sh
      uuid: '5599cffb-f23a-4e0f-a0b9-f74654641b2b'
      context: '3ce1f6fb-79ca-4564-a47e-98265f53ef7f'
      parameters:
        script: 'rm -f hello.log'

    - symbol: unarchive
      uuid: '2265b5d0-1f70-46de-bf50-f1050e9fac9a'
      context: '5e9d4943-33e5-4945-8a97-a11421cb4b11'
      parameters:
        name: 'hello.log'

    - symbol: sh
      uuid: '7f7ec29b-ad62-4fba-9c5f-db7a49a2d658'
      context: '3ce1f6fb-79ca-4564-a47e-98265f53ef7f'
      parameters:
        script: 'cat hello.log'
2020-11-01 15:52:41 -08:00
R Tyler Croy e55d2c38aa Disable the slower release profile builds for now 2020-11-01 15:02:18 -08:00
R Tyler Croy 51631ed09c Remove the processors/ which represent a slightly different take from earlier in Otto's development
This concept is likely going to come back in some form or another, but I don't
need to muddy the tree with it at the moment
2020-11-01 14:37:13 -08:00
R Tyler Croy 394a9c9ddd Implement a simplistic object store for putting artifacts 2020-11-01 14:37:13 -08:00
R Tyler Croy 1baebf061c Move the services into their own own directory for a cleaner root tree
There's going to be a number of services..
2020-10-30 20:05:44 -07:00
R Tyler Croy 87277d8ee0 Scaffolding for the archive step.
This includes the method stubs for the archive step. Before I continue I need to
do some thinking about how naming of archives might work, or where they can be
put for now.
2020-10-28 11:36:53 -07:00
R Tyler Croy 842248b29e Convert the error-step to a simple simple simple rust program 2020-10-28 10:28:25 -07:00
R Tyler Croy c11c05aac0 Relocate the primitive agent into the agent directory and wire in block scoped steps for the dir step
This was WAY EASIER than I thought it would be, which has me extra pumped about
this design decision.

The pipeline.yml sent to the agent:

  ---
  steps:
    - symbol: sh
      parameters:
        script: 'ls -lah | tail -n 5'

    - symbol: sh
      parameters:
        script: 'echo "Hello world from a script"'

    - symbol: dir
      parameters:
        directory: 'stdlib'
        block:
          - symbol: sh
            parameters:
              script: 'pwd && ls -lah'
          - symbol: echo
            parameters:
              message: 'Hello from a block-scoped step!'

    - symbol: unknown
      parameters:
        message: 'this should fail'

Then executing it in the tree:

  ❯ STEPS_DIR=$PWD/tmp ./target/debug/otto-agent ./test-pipeline.yml
  sh exists
  sh exists
  dir exists
  unknown/manifest.yml does not exist, step cannot execute
  NORMALLY THIS WOULD ERROR BEFORE ANYTHING EXECUTES
  ---
  -rw-r--r--  1 tyler users 1.1K Feb 20  2020 system.dot
  -rw-r--r--  1 tyler users  43K Feb 20  2020 system.png
  drwxr-xr-x  7 tyler users 4.0K Oct 17 15:25 target
  -rw-r--r--  1 tyler users 1.5K Oct 22 20:38 test-pipeline.yml
  drwxr-xr-x  5 tyler users 4.0K Oct 22 20:35 tmp
  Hello world from a script
  sh exists
  echo exists
  ---
  /home/tyler/source/git/otto/stdlib
  total 20K
  drwxr-xr-x  5 tyler users 4.0K Oct 22 20:02 .
  drwxr-xr-x 22 tyler users 4.0K Oct 22 20:38 ..
  drwxr-xr-x  4 tyler users 4.0K Oct 22 20:19 dir
  drwxr-xr-x  2 tyler users 4.0K Oct 22 20:28 echo
  drwxr-xr-x  4 tyler users 4.0K Oct 21 19:40 sh
  Hello from a block-scoped step!

Voila!
2020-10-22 20:35:49 -07:00
R Tyler Croy 43116fdd5a Scaffolding for the dir step
I need to refactor the agent code into a crate before continuing here
2020-10-22 20:11:16 -07:00
R Tyler Croy 8ff38597e3 Disable the eventbus-inmemory build for now, the front fell off 2020-10-18 13:41:43 -07:00
R Tyler Croy 8ea6eba6cc Starting to implement a very very primitive agent
This is not something that will ever be used, but I need a test scaffold for
step libraries
2020-10-18 13:38:24 -07:00
R Tyler Croy d7c8a1a6f5 Add some release binary size optimizations to the root Cargo.toml
Every step library should be stripped and shrinkeydinked as much as possible
2020-10-18 13:37:44 -07:00
R Tyler Croy 5048c04bf9 Implement the osp tool, something simple to package a step library into a tarball 2020-10-18 13:37:43 -07:00
R Tyler Croy 6ab574560e Implement the sh-step as an example for how step libraries might work
The packaging isn't there yet, but at least the scaffolding of how the native
steps will be invoked is here.
2020-10-18 13:34:11 -07:00
R Tyler Croy d4c2007006 Refactoring the inmemory eventbus into its own crate in the workspace
This helps eventbus stay a simple library that must be implemented by others
2020-06-21 14:40:50 -07:00
R Tyler Croy 649edcc1c0 Re-introduce the eventbus CLI utilities 2020-06-21 13:39:58 -07:00
R Tyler Croy c93be57709
Starting to scope out a simple Travis CI processor
I need something to generate some simple tasks to pump into the eventbus for the
auctioneer, this will have to do
2020-01-13 21:45:35 -08:00
R Tyler Croy 0c5e62a26a
Add the auctioneer bin stub 2019-12-30 07:32:34 -08:00
R Tyler Croy bf591d22d2
eventbus cargo scaffold 2019-12-27 11:26:39 -08:00
R Tyler Croy fb4143692e
Remove Cargo in the base directory 2019-06-25 19:08:26 -07:00
R Tyler Croy e34bf90526
fixup! Nuke the data-store/ which had a stub 2019-04-24 19:47:50 -07:00
R Tyler Croy c47ed8c5f3
Restructure the eventbus project to make a little more sense
I'll emulate this model elsewhere
2019-04-05 19:48:40 -07:00
R Tyler Croy 28cfb4c2da
Add a swagger codegen version of the eventbus API which is still 💩
I'm still noodling through how the eventbus HTTP API should look. My current
thinking is that it should approximately support Kafka like semantics, since
that's the likely first "real" backing implementation of eventbus
2019-03-27 21:03:42 -07:00
R Tyler Croy 5b34cb5a88
Implement the rust agent in more or less the same fashion as the Node one
Still not really doing anything worth a damn, but at least we're grabbing the
manifest and doing something with it at this point.

I still don't know squat about rust
2019-03-26 21:35:57 -07:00
R Tyler Croy 3ce4fcdd3f
Checking in some rust-based agent experimentation and an orchestrator stub
I clearly don't know anything about Rust thus far, but was just experimenting
with what it might look like to build an agent that requests JSON over HTTP
might look like.
2019-03-02 09:54:53 -08:00
R Tyler Croy 4932a701d3
Add some stubs for a multi-module project 2019-02-15 20:13:03 -08:00