Commit Graph

29 Commits

Author SHA1 Message Date
decentral1se 828417c92b
refactor: add config.GetAppComposeFiles 2021-08-06 19:38:06 +02:00
Roxie Gibson 239c925d66
WIP: foundations for app deploy 2021-08-03 08:49:16 +01:00
Roxie Gibson fa16ce20eb
refactor: added more comments to functions
many more are required but in too tired to do more
2021-08-02 08:02:18 +01:00
Roxie Gibson bb1eb372ef
refactor: stack func to client, mv app to new file
Stack interaction is now under client.

App types and functions moved from env to app under config
2021-08-02 05:51:58 +01:00
Roxie Gibson 9d621404fd
fix: avoid runtime error when list is empty 2021-08-02 00:37:23 +01:00
Roxie Gibson 805defec09
docs(comment): updated comment to be upto date 2021-07-31 21:25:32 +01:00
Roxie Gibson f958b888b6
fix: TestReadEnv test due to refactor 2021-07-31 21:08:50 +01:00
decentral1se 42968fb8e1
feat: finally implement app new command 2021-07-31 15:50:04 +02:00
decentral1se 932803453e
WIP: still hacking on the app new command
Finally had to fork godotenv because it strips comments and we need
those to parse length values (e.g. "FOO=v1  # length=10") (or in other
words, motivation to move to the YAML format).

There is a new secret module now, with functionality for dealing with
generation and parsing of secrets.

The final output needs some work and there is also the final step of
implementing the sending of secrets to the docker daemon. Coming Soon
™️.
2021-07-31 12:49:22 +02:00
decentral1se 5771f6c158
WIP another pass on the app new command 2021-07-30 22:55:00 +02:00
decentral1se f7b085dfa2
feat: add abra dir creation function 2021-07-28 22:10:42 +02:00
decentral1se 0e75350985
feat: prototype for app listing 2021-07-27 21:25:08 +02:00
decentral1se cf7a8d114a
chore: remove unused prototype code 2021-07-27 19:46:01 +02:00
decentral1se ef1591d596
WIP: app status listing using concurrency
This being my first time using goroutines, it is pretty messy but the
idea has been shown to be workable! We can concurrently look up multiple
contexts for a much faster response time especially when using multiple
servers.

Remaining TODOs are:

- [ ] Get proper status reporting (deployed/inactive/unknown)
- [ ] Error handling (especially when missing contexts)
- [ ] Refactor and tidy
2021-07-27 12:52:09 +02:00
decentral1se 3bc612c44e
WIP: status lookup for apps listing 2021-07-26 20:59:17 +02:00
decentral1se 5def18a9af
fix: sort by server and type for app listing 2021-07-26 19:47:44 +02:00
decentral1se 8656ae947a
tests: fix App def to match new struct format
Follows from 01cbee824a.
2021-07-26 19:22:26 +02:00
decentral1se 01cbee824a
WIP: app list command sorting 2021-07-26 18:23:28 +02:00
decentral1se 359b07b562
WIP: recipe create 2021-07-25 00:07:35 +02:00
decentral1se 1f6c0e8c4b
feat: support local apps.json loading
continuous-integration/drone/pr Build is passing Details
This logic supports the following cases:

- Download a fresh apps.json and load it if missing
- Check if a local apps.json is old and get a fresh one if so
- Always save a local copy after downloading a fresh apps.json

The http.Head() call is faster than a http.Get() call (only carries back
respones headers) and aims to make the more general case more
performant: you have the latest copy of the apps.json and don't need to
download another one. This a direct port of our Bash implementation
logic.

Closes https://git.autonomic.zone/coop-cloud/go-abra/issues/9.
2021-07-21 22:42:51 +02:00
Roxie Gibson 0242dfcb0f
fix: multiline vars can now be read using fork
continuous-integration/drone/push Build is passing Details
2021-07-21 12:05:50 +01:00
Roxie Gibson a36e80db99
fix: fixing domain being required.
continuous-integration/drone/push Build is passing Details
Fixes gitea issue #5
2021-07-21 08:38:13 +01:00
Roxie Gibson 16514b3151
feat: implemented type & servers flags in `app ls`
continuous-integration/drone/push Build is passing Details
2021-07-20 13:00:03 +01:00
Roxie Gibson a60ebf8710
tests: around 60% code coverage for config package
continuous-integration/drone/push Build is passing Details
2021-07-19 14:36:00 +01:00
Roxie Gibson cfe2f70151
refactor: moving logging to command functions
easier to unit test our util commands like this
2021-07-19 12:47:46 +01:00
Roxie Gibson bd9bc530d1
faet: a draft version of the app ls command
continuous-integration/drone/push Build is passing Details
2021-07-19 08:37:00 +01:00
Roxie Gibson f7059dbe98
refactor: filesystem io 2021-07-19 07:04:37 +01:00
Roxie Gibson 6caa176308
WIP: Enviroment file loading and config management
continuous-integration/drone/push Build is passing Details
2021-07-18 10:49:31 +01:00
Roxie Gibson 38f610bdec
feat: abra server ls
continuous-integration/drone/push Build is passing Details
WE DID IT! The first actual command to be ported.

Code is still a mess in terms of UX but its a milestone!
2021-07-18 04:21:26 +01:00