cryptobiu / MATRIX

MPC Simulation Framework
MIT License
24 stars 13 forks source link

Naming of Key Pairs #8

Closed lenerd closed 6 years ago

lenerd commented 6 years ago

Hi,

I have used the Create Key pair(s) option from the Deploy menu. This resulted in the creation of a private key Matrixuseast1-1 in ~/Keys where the filename has suffix -1. https://github.com/cryptobiu/MATRIX/blob/77a331626027cc4c7c4855aff8fe640ecde15e69/Deployment/aws_deploy.py#L29-L30

During deployment, the Matrix client tries to use the key name from regions.json where this suffix is omitted (it is just Matrixuseast1).

https://github.com/cryptobiu/MATRIX/blob/77a331626027cc4c7c4855aff8fe640ecde15e69/Deployment/aws_deploy.py#L116-L132

Choose deployment task
1. Deploy Instance(s)
2. Create Key pair(s)
3. Create security group(s)
4. Get instances network data
5. Terminate machines
6. Change machines types
7. Start instances 
8. Stop instances
Your choice:1
Current date : 
2018-09-11 14:23:54.714932
Deploying instances :
region : us-east-1b
number of instances : 3
ami_id : ami-08c9a677
instance_type : c4.large
valid until : 2018-09-11 20:23:54.714932
THE KEY PAIR 'MATRIXUSEAST1' DOES NOT EXIST
Waiting for the images to be deployed..

I can change the entry of the regions.json, but I am not sure what happens when there are multiple regions involved.

liorko87 commented 6 years ago

Hi,

At your config file, you defined your requested regions: https://github.com/cryptobiu/MATRIX/blob/77a331626027cc4c7c4855aff8fe640ecde15e69/ProtocolsConfigurations/Config_ABY_InnerProduct.json#L30-L33 The b at the end specify the placement group inside the region. Since the regions.json file is common to all the placement groups inside a region, the code snippet omits the placemant group specifier and not the suffix of the key name.

Hence you should change the regions.json file according to your key file name.