Skip to content

Initial version #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Apr 12, 2016
Merged

Initial version #1

merged 11 commits into from
Apr 12, 2016

Conversation

ddragosd
Copy link
Member

  • sync with rclone. Note that rclone doesn't work yet with IAM Roles and this is why we're using AWS cli.
  • includes AWS CLI for syncing files form S3

@clehene
Copy link

clehene commented Feb 11, 2016

👍

1 similar comment
@selfxp
Copy link

selfxp commented Feb 11, 2016

👍

"runtime"
"runtime/pprof"
"time"
// "net/http"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove please

@adragomir
Copy link

@ddragosd 🤘 after the comments. I'll create an issue to use sync from the go AWS SDK, I really don't like executing aws s3 sync from the command line.

@ddragosd
Copy link
Member Author

@adragomir I've also started initially at integrating a library as opposed to executing a command line. I've picked rclone as it comes with broader support, it's not just for AWS.

There are 2 problems with rclone:

  1. I couldn't integrate it as a lib - hence the idea of executing a command line
  2. It doesn't work with IAM Roles 😄 - which is a big miss for people using AWS. If the 1st point would have worked we could have fixed the IAM roles.

So at the moment I don't have a solution to support multiple clouds and integrate it as a lib, but I agree with you that it would be a nicer implementation.

```
{
    status: "OK",
    lastSync: "2016-02-24T23:10:36.148512004-08:00",
    lastChangeDetected: "2016-02-24T23:07:36.036041758-08:00",
    lastReload: "2016-02-24T23:07:41.041648492-08:00"
}
```
@ddragosd
Copy link
Member Author

@selfxp @clehene @adragomir I've added unit tests and along with them I've enriched the health-check API. This API may be exposed also through the API Gateway's health-check and even take action in the Gateway if the lastSync is not as expected ( i.e < 10s ), and return a 5xx error, causing the container to restart.

(updated) Sample output for the health-check API:

{
    status: "OK",
    lastSync: "2016-02-24T23:10:36.148512004-08:00",
    lastChangeDetected: "2016-02-24T23:07:36.036041758-08:00",
    lastReload: "2016-02-24T23:07:41.041648492-08:00"
}

Let me know what you think.

@selfxp
Copy link

selfxp commented Apr 12, 2016

👍

@selfxp selfxp merged commit 05fcbb5 into master Apr 12, 2016
@selfxp selfxp deleted the initial-poc branch April 12, 2016 05:39
@selfxp selfxp restored the initial-poc branch April 12, 2016 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants