Giter Club home page Giter Club logo

laniakea's People

Contributors

choller avatar jschwartzentruber avatar mozilla-github-standards avatar nth10sd avatar posidron avatar rforbes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

laniakea's Issues

Block device mapping should be flexible.

The Laniakea.images dictionary assumes one block device per machine and it is named /dev/sda1. This is not a universal name, and prevents laniakea from launching AMIs with other requirements. For example the official AMIs for CoreOS use /dev/xvda1.

Currently, launching a spot request for CoreOS-stable AMI with laniakea gives the following:

State: failed: Either snapshot ID or volume size must be provided for: /dev/sda1
Status: bad-parameters: Your Spot request failed due to bad parameters. 

ec2.get_all_images often takes too long

This line located at

remote_images = self.ec2.get_all_images(owners=['self', 'amazon', 'aws-marketplace'])

causes the returned list to be huge - it times out often, but when it succeeds, it gives a huge result.

We seem to be retrieving a list that is too big - some folks have had success switching to Python 3 - but Python 3 only worked once for me.

I worked around the issue by removing aws-marketplace to simplify the list retrieved, but it seems a solution might be to use paginator or some sort of filter as discussed.

[EC2] Failed spot request logs nothing.

$ python -m laniakea ec2 -create-spot -userdata default.sh -tags Name=test -max-spot-price 0.6 -region us-east-1 -zone us-east-1e -profile default
[Laniakea] 2018-08-24 10:25:49 INFO: Loading Laniakea configuration from /home/user/.config/laniakea/laniakea.json
[Laniakea] 2018-08-24 10:25:49 INFO: Reading user data script content from /home/user/src/m/laniakea/laniakea/userdata/ec2/default.sh
[Laniakea] 2018-08-24 10:25:49 INFO: Processing "import" of common.sh
[Laniakea] 2018-08-24 10:25:49 INFO: Using image definition "default" from /home/user/.config/laniakea/amazon.json
[Laniakea] 2018-08-24 10:25:49 INFO: Using Boto configuration profile "default"
[Laniakea] 2018-08-24 10:25:50 INFO: Waiting on fulfillment of requested spot instances.
$

The state of the spot request is 'failed' and status is 'bad-parameters' due to invalid availability zone (EC2 issue).

I would expect to see this logged as an error.

CODE_OF_CONDUCT.md file missing

As of January 1 2019, Mozilla requires that all GitHub projects include this CODE_OF_CONDUCT.md file in the project root. The file has two parts:

  1. Required Text - All text under the headings Community Participation Guidelines and How to Report, are required, and should not be altered.
  2. Optional Text - The Project Specific Etiquette heading provides a space to speak more specifically about ways people can work effectively and inclusively together. Some examples of those can be found on the Firefox Debugger project, and Common Voice. (The optional part is commented out in the raw template file, and will not be visible until you modify and uncomment that part.)

If you have any questions about this file, or Code of Conduct policies and procedures, please see Mozilla-GitHub-Standards or email [email protected].

(Message COC001)

Make the setup process more lightweight

Briefly discussed in #30

A possible idea would be:

Add a new directory called requirements and extract module dependencies out of the requirements.txt and put those into their own requirement files: i.e azure.txt, amazon.txt. A user then would run:

pip install -r requirements.txt -r azure.txt -r amazon.txt

Where requirements.txt would consist of the base requirements for Laniakea. Each module would then call sys.exit if the module is not available and point with an error message to the required requirements file.

[EC2] Use boto3

We should support boto3 and remove boto2. In particular, the spot request API was simplified significantly (same API for spot/demand instances), but we need to use boto3 to take advantage of that..

[GCE] API should be usable asynchronously

Operations like create() and terminate() block execution until completed. There should be a way of polling for state changes as we do with EC2. Not sure if there is a precedent for this in libcloud or if we would have to abandon libcloud.

Laniakea throws because time_exceeded is not specified, if timeout is None

The following line throws if timeout is not specified:
https://github.com/MozillaSecurity/laniakea/blob/59536ad/core/manager.py#L158

Traceback (most recent call last):
  File "/Users/skywalker/trees/laniakea/laniakea.py", line 299, in <module>
    sys.exit(LaniakeaCommandLine().main())
  File "/Users/skywalker/trees/laniakea/laniakea.py", line 223, in main
    args.ebs_volume_type, args.ebs_volume_delete_on_termination)
  File "/Users/skywalker/trees/laniakea/core/manager.py", line 158, in create_spot
    elif time_exceeded:
UnboundLocalError: local variable 'time_exceeded' referenced before assignment

Add scale-up and scale-down arguments

Add a way to quickly add and kill instances.
Suggestion:
-scale-up N
-scale-down N
The scale-down function should probably kill instances which are the oldest ones.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.