vagrant-g5k 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/CHANGELOG.md +23 -2
 - data/Vagrantfile +13 -0
 - data/lib/vagrant-g5k/action/connect_g5k.rb +1 -0
 - data/lib/vagrant-g5k/config.rb +6 -0
 - data/lib/vagrant-g5k/util/g5k_utils.rb +3 -2
 - data/lib/vagrant-g5k/version.rb +1 -1
 - metadata +2 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 71442ce64f1bd79dfaa907ed185ed54bc24a491e
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: abbd6a67d44e02459384e9900679c8da373286ae
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 0816c3a1356533afbfc5e3e97cb993cd2f745230b8b169ca9389af467755cff47ab6eb1f27586ad3dea297efeff7f089ad8f989494500966cd70c840c32c9fd3
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: fde42765e24413a1fded93e330a5ca7482f932e5b7489e2a25e91dfb14663d4096710243e2db1cef2fab59cb7e6bbd378efd41c10795836e8daff86bab942e02
         
     | 
    
        data/CHANGELOG.md
    CHANGED
    
    | 
         @@ -1,4 +1,25 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # 0.0.9
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
              * Add support for custom walltime
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            # 0.0.8
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
              * Add support for custom private key
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
            # 0.0.7
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
              * Support for ephemeral / persitent backing file
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            # 0.0.6
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
              * SSH ports has to be forwarded explicitly
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
            # 0.0.5
         
     | 
| 
      
 18 
     | 
    
         
            +
              
         
     | 
| 
      
 19 
     | 
    
         
            +
              * Add destroy command
         
     | 
| 
      
 20 
     | 
    
         
            +
              * Remove vmlist command
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
       1 
22 
     | 
    
         
             
            # 0.0.4
         
     | 
| 
       2 
23 
     | 
    
         | 
| 
       3 
     | 
    
         
            -
              *  
     | 
| 
       4 
     | 
    
         
            -
              *  
     | 
| 
      
 24 
     | 
    
         
            +
              * Use nat-ted network provided by kvm
         
     | 
| 
      
 25 
     | 
    
         
            +
              * Remove hard-coded names
         
     | 
    
        data/Vagrantfile
    CHANGED
    
    | 
         @@ -18,14 +18,27 @@ Vagrant.configure(2) do |config| 
     | 
|
| 
       18 
18 
     | 
    
         
             
                config.vm.provider "g5k" do |g5k|
         
     | 
| 
       19 
19 
     | 
    
         
             
                  # user name used to connect to g5k
         
     | 
| 
       20 
20 
     | 
    
         
             
                  g5k.username = ENV['USER']
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
       21 
22 
     | 
    
         
             
                  # private key 
         
     | 
| 
       22 
23 
     | 
    
         
             
                  # g5k.private_key = File.join(ENV['HOME'], ".ssh/id_rsa_discovery")
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
       23 
25 
     | 
    
         
             
                  # site to use
         
     | 
| 
       24 
26 
     | 
    
         
             
                  g5k.site = "rennes"
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
                  # walltime to use
         
     | 
| 
      
 29 
     | 
    
         
            +
                  # g5k.walltime = "02:00:00" 
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
       25 
31 
     | 
    
         
             
                  # image location 
         
     | 
| 
       26 
32 
     | 
    
         
             
                  g5k.image_location = "/grid5000/virt-images/alpine_docker.qcow2"
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
       27 
34 
     | 
    
         
             
                  # it could be backed by the ceph
         
     | 
| 
       28 
35 
     | 
    
         
             
                  # g5k.image_location = "rbd:msimonin_rbds/virt/alpine_docker_analyse-090916:id=msimonin:conf=/home/msimonin/.ceph/config"
         
     | 
| 
      
 36 
     | 
    
         
            +
                  
         
     | 
| 
      
 37 
     | 
    
         
            +
                  # g5k.backing_strategy = "snapshot"
         
     | 
| 
      
 38 
     | 
    
         
            +
                  #   this is a copy on write strategy 
         
     | 
| 
      
 39 
     | 
    
         
            +
                  #   image_location is use to read, an epehemeral disk will hold the writes
         
     | 
| 
      
 40 
     | 
    
         
            +
                  # if not specified this means that the image is used in r/w mode.
         
     | 
| 
      
 41 
     | 
    
         
            +
                  #   changes will be persistent
         
     | 
| 
       29 
42 
     | 
    
         
             
                  g5k.backing_strategy = "snapshot"
         
     | 
| 
       30 
43 
     | 
    
         
             
                  # ports to expose (at least ssh has to be forwarded)
         
     | 
| 
       31 
44 
     | 
    
         
             
                  g5k.ports = ['2222-:22']
         
     | 
| 
         @@ -18,6 +18,7 @@ module VagrantPlugins 
     | 
|
| 
       18 
18 
     | 
    
         
             
                         :logger => env[:ui],
         
     | 
| 
       19 
19 
     | 
    
         
             
                         :username => env[:machine].provider_config.username,
         
     | 
| 
       20 
20 
     | 
    
         
             
                         :private_key => env[:machine].provider_config.private_key,
         
     | 
| 
      
 21 
     | 
    
         
            +
                         :walltime => env[:machine].provider_config.walltime,
         
     | 
| 
       21 
22 
     | 
    
         
             
                         :image_location => env[:machine].provider_config.image_location, 
         
     | 
| 
       22 
23 
     | 
    
         
             
                         :site => env[:machine].provider_config.site,
         
     | 
| 
       23 
24 
     | 
    
         
             
                         :ports => env[:machine].provider_config.ports,
         
     | 
    
        data/lib/vagrant-g5k/config.rb
    CHANGED
    
    | 
         @@ -14,6 +14,11 @@ module VagrantPlugins 
     | 
|
| 
       14 
14 
     | 
    
         
             
                  # @return [String]
         
     | 
| 
       15 
15 
     | 
    
         
             
                  attr_accessor :private_key
         
     | 
| 
       16 
16 
     | 
    
         | 
| 
      
 17 
     | 
    
         
            +
                  # G5K walltime
         
     | 
| 
      
 18 
     | 
    
         
            +
                  #
         
     | 
| 
      
 19 
     | 
    
         
            +
                  # @return [String]
         
     | 
| 
      
 20 
     | 
    
         
            +
                  attr_accessor :walltime
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
       17 
22 
     | 
    
         
             
                  # G5K site
         
     | 
| 
       18 
23 
     | 
    
         
             
                  #
         
     | 
| 
       19 
24 
     | 
    
         
             
                  # @return [String]
         
     | 
| 
         @@ -40,6 +45,7 @@ module VagrantPlugins 
     | 
|
| 
       40 
45 
     | 
    
         
             
                    @image_location = nil
         
     | 
| 
       41 
46 
     | 
    
         
             
                    @site = "rennes"
         
     | 
| 
       42 
47 
     | 
    
         
             
                    @backing_strategy = ""
         
     | 
| 
      
 48 
     | 
    
         
            +
                    @walltime = "01:00:00"
         
     | 
| 
       43 
49 
     | 
    
         
             
                  end
         
     | 
| 
       44 
50 
     | 
    
         | 
| 
       45 
51 
     | 
    
         
             
                  def finalize!()
         
     | 
| 
         @@ -7,7 +7,6 @@ require 'vagrant/util/retryable' 
     | 
|
| 
       7 
7 
     | 
    
         
             
            WORKING_DIR = ".vagrant-g5k"
         
     | 
| 
       8 
8 
     | 
    
         
             
            LAUNCHER_SCRIPT = "launch_vm_fwd.sh"
         
     | 
| 
       9 
9 
     | 
    
         
             
            JOB_SUBNET_NAME = "vagrant-g5k-subnet"
         
     | 
| 
       10 
     | 
    
         
            -
            WALLTIME="01:00:00"
         
     | 
| 
       11 
10 
     | 
    
         | 
| 
       12 
11 
     | 
    
         
             
            module VagrantPlugins
         
     | 
| 
       13 
12 
     | 
    
         
             
              module G5K
         
     | 
| 
         @@ -22,6 +21,8 @@ module VagrantPlugins 
     | 
|
| 
       22 
21 
     | 
    
         | 
| 
       23 
22 
     | 
    
         
             
                  attr_accessor :site
         
     | 
| 
       24 
23 
     | 
    
         | 
| 
      
 24 
     | 
    
         
            +
                  attr_accessor :walltime
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
       25 
26 
     | 
    
         
             
                  attr_accessor :image_location
         
     | 
| 
       26 
27 
     | 
    
         | 
| 
       27 
28 
     | 
    
         
             
                  attr_accessor :logger
         
     | 
| 
         @@ -112,7 +113,7 @@ module VagrantPlugins 
     | 
|
| 
       112 
113 
     | 
    
         
             
                    args = [drive, net, snapshot_flag].join(" ")
         
     | 
| 
       113 
114 
     | 
    
         
             
                    # Submitting a new job
         
     | 
| 
       114 
115 
     | 
    
         
             
                    @logger.info("Starting a new job")
         
     | 
| 
       115 
     | 
    
         
            -
                    job_id = exec("oarsub -t allow_classic_ssh -l \"{virtual!=\'none\'}/nodes=1,walltime=#{ 
     | 
| 
      
 116 
     | 
    
         
            +
                    job_id = exec("oarsub -t allow_classic_ssh -l \"{virtual!=\'none\'}/nodes=1,walltime=#{@walltime}\" --name #{env[:machine].name} --checkpoint 60 --signal 12  \"#{launcher_remote_path} #{args}\" | grep OAR_JOB_ID | cut -d '='  -f2").chomp
         
     | 
| 
       116 
117 
     | 
    
         | 
| 
       117 
118 
     | 
    
         | 
| 
       118 
119 
     | 
    
         
             
                    begin
         
     | 
    
        data/lib/vagrant-g5k/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: vagrant-g5k
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.0.9
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Matthieu Simonin
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2016-09- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2016-09-16 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: iniparse
         
     |