To be continued...
To be continued...
To be continued...
1. source [compiles to] 2. application artifact [is packaged in] 3. image artifact [is deployed as] 4. web service [is verified by] 5. test results
1. source [compiles to] 2. application artifact [is packaged in] 3. image artifact [is deployed as] 4. web service [is verified by] 5. test results
1. source [compiles to] 2. application artifact [is packaged in] 3. image artifact [is deployed as] 4. web service [is verified by] 5. test results
module Kremis class Actor def execute(context) raise NotImplementedError, "#{self.class}#execute must be implemented" end end
end
module Kremis class Actor def execute(context) raise NotImplementedError, "#{self.class}#execute must be implemented" end end
end
module Kremis class Actor def execute(context) raise NotImplementedError, "#{self.class}#execute must be implemented" end end
end
require_relative "../../lib/kremis" module Actors class Build < Kremis::Actor def execute(context) app_dir = File.expand_path("../../../app", __dir__) tag = "infinity-service:#{context[:commit]}" puts " docker build -t #{tag} #{app_dir}" result = system("docker build -t #{tag} #{app_dir}") raise "Docker build failed" unless result context.merge(image_tag: tag) end end
end
require_relative "../../lib/kremis" module Actors class Build < Kremis::Actor def execute(context) app_dir = File.expand_path("../../../app", __dir__) tag = "infinity-service:#{context[:commit]}" puts " docker build -t #{tag} #{app_dir}" result = system("docker build -t #{tag} #{app_dir}") raise "Docker build failed" unless result context.merge(image_tag: tag) end end
end
require_relative "../../lib/kremis" module Actors class Build < Kremis::Actor def execute(context) app_dir = File.expand_path("../../../app", __dir__) tag = "infinity-service:#{context[:commit]}" puts " docker build -t #{tag} #{app_dir}" result = system("docker build -t #{tag} #{app_dir}") raise "Docker build failed" unless result context.merge(image_tag: tag) end end
end
nita@infinity:~/work/infinite-money > git add .; git commit -m save your files 💾 - tom dibblee; git push
[ticket-001 924d48a] save your files 💾 - tom dibblee 1 file changed, 1 insertion(+)
Enumerating objects: 11, done.
Counting objects: 100% (11/11), done.
Delta compression using up to 12 threads
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 733 bytes | 733.00 KiB/s, done.
Total 6 (delta 1), reused 0 (delta 0), pack-reused 0 (from 0)
To git.sr.ht:~graemefawcett/sprout bb441f3..924d48a ticket-001 -> ticket-001
nita@infinity:~/work/infinite-money > git add .; git commit -m save your files 💾 - tom dibblee; git push
[ticket-001 924d48a] save your files 💾 - tom dibblee 1 file changed, 1 insertion(+)
Enumerating objects: 11, done.
Counting objects: 100% (11/11), done.
Delta compression using up to 12 threads
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 733 bytes | 733.00 KiB/s, done.
Total 6 (delta 1), reused 0 (delta 0), pack-reused 0 (from 0)
To git.sr.ht:~graemefawcett/sprout bb441f3..924d48a ticket-001 -> ticket-001
nita@infinity:~/work/infinite-money > git add .; git commit -m save your files 💾 - tom dibblee; git push
[ticket-001 924d48a] save your files 💾 - tom dibblee 1 file changed, 1 insertion(+)
Enumerating objects: 11, done.
Counting objects: 100% (11/11), done.
Delta compression using up to 12 threads
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 733 bytes | 733.00 KiB/s, done.
Total 6 (delta 1), reused 0 (delta 0), pack-reused 0 (from 0)
To git.sr.ht:~graemefawcett/sprout bb441f3..924d48a ticket-001 -> ticket-001 - [x] setup a build environment with the correct JDK
- [x] build and run the application
- [x] perform a simple smoke test
- [x] determine the runtime environment (networking, monitoring)
- [x] determine the runtime orchestrator
- [x] create a service definition
- [x] smoke test the service - source enters the universe in the form on a repository with a specific hash to be built
- an application artifact in the form of a JAR
- an image artifact in the form of an OCI image
- a web service responding to HTTP requests
- a set of test results that verify that the deployment was completed successfully - compiles to could be implemented with a wrapper around mvn
- is packaged in could be implemented with docker build
- is deployed as could be implemented with docker compose up
- is verified by could be implemented by a wrapper around Net::HTTP that captured the results in the context - her final build script would need to be co-located with the application being deployed and Alice had left her code in an app directory, so she'd be ok to use relative paths. She hoped her boss was back soon so she could inquire about Infinity Co's artifact repository, she'd used Nexus in the past and was eager to get her new gem package deployed somewhere the build servers could access it. She didn't want to leave the deployment code packaged with the application any longer than she needed to
- the only requirement that her boss had given her in her brief orientation was that she capture the specific hash of any comit contributing to the build for tracking purposes. Infinity Co were big on numbers he'd implied and really liked to track things. She'd decided that it would be ok to use the commit has as an input to her pipeline for now, as it was generally available in most CI systems environments. This would enter the build actor as part of the global context
- as this was an internal system in use for one application with a fully deterministic configuration, she felt safe combining string concatenation with a #system call - [x] A build actor that can wrap Docker and execute multi-stage Dockerfiles to combine the build and image stages that her old build system separated
- [ ] A deploy actor that could automatically update and deploy a Docker compose service definition with an updated image
- [ ] A simple verification actor that can perform a post-deployment validation
- [ ] A simple engine to chain them together and manage shared context