Comments (5)
Thanks @kim0,
There's actually two different scenarios here. When creating a user account with which to remotely access the compute node, you're quite right and the server should be supplied with the public key. This is documented in the user create command:
docs.microsoft.com/cli/azure/batch/node/user#create
The Linux user config on the pool that requires the private key is for a different scenario where the Batch service impersonates / runs a work load as a specified user. This concept is discussed further in this article:
docs.microsoft.com/azure/batch/batch-user-accounts
Additionally, the specific scenario that requires the private ssh key is documented in the Batch API:
docs.microsoft.com/rest/api/batchservice/add-a-pool-to-an-account#linuxUserConfiguration
The SSH private key is used to automatically configure password-less SSH between nodes in a Linux pool when the pool's enableInterNodeCommunication property is true. If not specified, password-less SSH is not configured between nodes.
Hopefully this helps clarify :)
from azure-batch-cli-extensions.
Thank you! It certainly helps. However can you please show me where to inject the public ssh key into the json file (that's used in --json-file)? The json schema did not mention any public ssh key :)
Thanks a lot
from azure-batch-cli-extensions.
The public ssh key is not actually part of pool create process. The userAccounts
property on the pool is only for this "user impersonation" feature - so the public key can't be inserted into this particular json file. You can however supply it in a json file to the user create command. Where your json will look like this:
{
"name":"myuseraccount1",
"isAdmin":true,
"password":"mypassword",
"expiryTime": "2017-08-01T23:00:00.000Z",
"sshPublicKey": "mysshkey"
}
This can then be added with an additional command:
az batch pool create --json-file my_pool.json
az batch node user create --pool-id <pool_id> --node-id <node_id> --json-file my_user_settings.json
from azure-batch-cli-extensions.
Alright, since this bug report does not seem related to what I'm trying to do, I'm not very passionate about it :) I'll continue my discussion in #30
However, thinking about it. It's a bit confusing to have user accounts in two different places. I mean, we could always be creating the user account using the same json file. And if the user should be remotely accessible, I'd supply public ssh key. If the user account would only be used to internally ssh'ing between nodes. I'd supply the private key. I can even supply both keys and the user-account ends up being used in both ways. That way seems more logical to me!
Feel free to close this ticket at any time folks. Thanks
from azure-batch-cli-extensions.
Thanks @kim0 - I agree it's confusing to differentiate between the two scenarios that are both documented as a "user account" - even though they achieve very different things.... I'll give this feedback to the team.
from azure-batch-cli-extensions.
Related Issues (20)
- Batch azure-batch-cli-extensions shows unknown version HOT 4
- InvalidURL error in az pool create --template HOT 3
- Task factory taskPerFile storing source files with owner root for absolute paths HOT 2
- Task factory "task per file" fails with source "containerUrl" HOT 2
- az batch pool create command does not recognize the "interNodeCommunication": "false" element HOT 1
- 'ValidationError' object has no attribute 'message'
- Error creating Batch Pool from CLI template HOT 7
- create Task only for existing job
- Dry run mode? (emit rendered template only)
- pool: Unexpect element taskSlotsPerNode in template HOT 5
- pool: Unexpect element identity in template HOT 1
- azure-batch-cli-extension is not compatible with the latest batch SDK HOT 1
- Unable to upload file using "az batch file upload" on windows
- Unable to upload files using "az batch file upload" on ubuntu
- Passing environment variables is not documented
- NoneType not parsed correctly by template parser HOT 1
- Please close as this is a duplicate.
- az batch pool create command isn't running as expected. HOT 2
- Unable to get azure batch CLI extensions working on Windows HOT 2
- Unable to install batch extension in azure cli docker image HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-batch-cli-extensions.