Skip to content
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

Serverless prototype #539

Merged
merged 1 commit into from
Dec 19, 2016
Merged

Serverless prototype #539

merged 1 commit into from
Dec 19, 2016

Conversation

bquenin
Copy link
Contributor

@bquenin bquenin commented Dec 11, 2016

Related to #521

Verification

$ amp pf stop
$ make install
$ ./shrink.sh local
$ amp pf start --local
$ make test

CLI tests

The source code of the amp-demo-function is available here: amp-demo-function

$ docker build -t appcelerator/amp-demo-function examples/functions/demo-function
[...]

$ amp function --help

Usage:  amp function COMMAND

function operations

Aliases:
  function, fn

Options:
      --config string   Config file (default is $HOME/.amp.yaml)
  -h, --help            help for function
      --server string   Server address
  -v, --verbose         Verbose output

Commands:
  create      Create a function
  ls          List functions
  rm          Remove function

 Run 'amp function COMMAND --help' for more information on a command.

$ amp fn create -i appcelerator/amp-demo-function test
[function-id]

$ amp fn ls
ID              Name   Image
[function-id]   test   appcelerator/amp-demo-function   

$ cat Makefile | curl 127.0.0.1:4242/[function-id] --data-binary @-
[The result should be a Capitalized Makefile]

$ amp fn rm [function-id]
[function-id]

$ amp fn ls
ID   Name   Image

@bquenin bquenin force-pushed the serverless-proto branch 7 times, most recently from 2fad9c1 to 1819f11 Compare December 11, 2016 02:15
Copy link
Contributor

@freignat91 freignat91 left a comment

Choose a reason for hiding this comment

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

LGTM and tests executed ok

@generalhenry
Copy link
Contributor

It would be nice if you could use [function-ident] in place of [function-id]

I would also prefer fn.local.atomiq.io (or the like) to localhost:4242 (aka add it to the haproxy config)

@generalhenry
Copy link
Contributor

One more small thing, amp function ls should have a -q --quiet options for amp function rm $(amp fn ls -q) cleanups

@bquenin
Copy link
Contributor Author

bquenin commented Dec 12, 2016

@generalhenry You're right about the URL, this is only temporary. It should definitely be something like fn.local.atomiq.io.
I'll make an update regarding the -q.
Regarding function-name vs. function-id, it's just temporary as well, I only built the index by id in etcd.
I'm waiting for feedback on the global approach but all your comments are helpful.
Thanks!

@bquenin
Copy link
Contributor Author

bquenin commented Dec 14, 2016

⚠️ Also, I think we're hitting a bug in Docker causing the container attachment to fail sporadically, causing the function to fail.
For reference, the bug mentioned is moby/moby#29285

@bquenin bquenin added the icebox label Dec 15, 2016
@bquenin
Copy link
Contributor Author

bquenin commented Dec 15, 2016

Maybe this issue has an impact as well: moby/moby#29421

@bquenin bquenin force-pushed the serverless-proto branch 4 times, most recently from dfb147a to ecf004e Compare December 15, 2016 23:21
@thaJeztah
Copy link

@bquenin docker 1.12.5 has been released, which contains moby/moby#29424 to resolve the issue you linked to; https://github.com/docker/docker/releases/tag/v1.12.5

@bquenin
Copy link
Contributor Author

bquenin commented Dec 16, 2016

@thaJeztah thanks for the feedback. Just tested it with 1.12.5 and now it works like a charm!
👊

@bquenin bquenin removed the icebox label Dec 16, 2016
@subfuzion
Copy link
Contributor

Thanks @thaJeztah. I would imagine this will land shortly in the next 1.13 RC as well then (we're currently on v1.13.0-rc3).

@thaJeztah
Copy link

@subfuzion looks like the fix was actually in 1.13.0-rc2 already (see moby/moby#28674); are you having this problem on RC3?

@bquenin
Copy link
Contributor Author

bquenin commented Dec 16, 2016

@thaJeztah I tested on latest stable (1.12.5). Going to check on 1.13.0-rc3.

@thaJeztah
Copy link

Perfect! If you have problems on 1.13, please open an issue in the issue tracker 👍

@bquenin
Copy link
Contributor Author

bquenin commented Dec 16, 2016

@thaJeztah Just tested it a thousand times on 1.13.0-rc3, works fine as well! Thanks again

@thaJeztah
Copy link

Thanks for testing!

@bquenin bquenin force-pushed the serverless-proto branch 11 times, most recently from 83e1192 to 7c3f539 Compare December 17, 2016 17:10
@subfuzion subfuzion changed the base branch from master to v0.5.0-rc1 December 19, 2016 16:05
@subfuzion
Copy link
Contributor

@bquenin Very nice! I'm merging this into v0.5.0-rc1 for additional evaluation. 👍

@subfuzion
Copy link
Contributor

@bquenin It looks like there are a few conflicts due to @freignat91 / @ndegory cluster management PR that I just merged into v0.5.0-rc1. Can you work to resolve asap? Thanks!

@chrisccoy chrisccoy mentioned this pull request Dec 19, 2016
@bquenin
Copy link
Contributor Author

bquenin commented Dec 19, 2016

@subfuzion Ok, I rebased on the branch v0.5.0-rc1

@subfuzion subfuzion merged commit 255d076 into v0.5.0-rc1 Dec 19, 2016
bquenin pushed a commit that referenced this pull request Dec 19, 2016
@bquenin bquenin deleted the serverless-proto branch December 19, 2016 16:46
subfuzion pushed a commit that referenced this pull request Dec 19, 2016
@subfuzion subfuzion restored the serverless-proto branch December 20, 2016 00:11
@bquenin bquenin deleted the serverless-proto branch December 20, 2016 00:29
subfuzion added a commit that referenced this pull request Dec 30, 2016
* commit server,agents,clients, AMP Bootstrap and fixes reports (#519)

* add bootstrap feature to AMP cluster CLI (#306)

* update vendors (huge diff)

* serverless prototype (#539)

* Amp cleanup (#603)

* Fix for issues #547,#561,#565

* minor cleanup

* commit server,agents,clients, AMP Bootstrap and fixes reports (#519)

* add bootstrap feature to AMP cluster CLI (#306)

* update vendors (huge diff)

* serverless prototype (#539)

* Amp version more useful info
@bquenin bquenin added this to the 0.5.0 milestone Jan 3, 2017
generalhenry pushed a commit that referenced this pull request Jan 6, 2017
generalhenry added a commit that referenced this pull request Jan 11, 2017
* commit server,agents,clients, AMP Bootstrap and fixes reports (#519)

* add bootstrap feature to AMP cluster CLI (#306)

* update vendors (huge diff)

* serverless prototype (#539)

* commit server,agents,clients, AMP Bootstrap and fixes reports (#519)

* add bootstrap feature to AMP cluster CLI (#306)

* update vendors (huge diff)

* Revert "Amp version command - more useful info" (#611)

* Add functions to the ui (#605)

* KV ui (#606)

* Add functions to the ui

* add kv to ui

* bump version to 0.6.0-dev

* Added amp help command (#652)

* Included Long message in help command output

* remerge version
bquenin pushed a commit that referenced this pull request Jan 12, 2017
* commit server,agents,clients, AMP Bootstrap and fixes reports (#519)

* add bootstrap feature to AMP cluster CLI (#306)

* update vendors (huge diff)

* serverless prototype (#539)

* commit server,agents,clients, AMP Bootstrap and fixes reports (#519)

* add bootstrap feature to AMP cluster CLI (#306)

* update vendors (huge diff)

* Revert "Amp version command - more useful info" (#611)

* Add functions to the ui (#605)

* KV ui (#606)

* Add functions to the ui

* add kv to ui

* bump version to 0.6.0-dev

* Added amp help command (#652)

* Included Long message in help command output

* remerge version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants