update docs to include github auth feature (#75)
* update docs to include github auth feature * pr feedback for more verbose context * move github auth instructions to pacakge management document * remove github specific link from readme
This commit is contained in:
Родитель
53b80585ea
Коммит
0f03d171f2
|
@ -170,7 +170,8 @@ Use your pool configuration JSON file to define your pool in Azure.
|
|||
},
|
||||
"rPackages": {
|
||||
"cran": ["some_cran_package", "some_other_cran_package"],
|
||||
"github": ["username/some_github_package", "another_username/some_other_github_package"]
|
||||
"github": ["username/some_github_package", "another_username/some_other_github_package"],
|
||||
"githubAuthenticationToken": {}
|
||||
},
|
||||
"commandLine": []
|
||||
}
|
||||
|
|
|
@ -18,6 +18,41 @@ You can install packages by specifying the package(s) in your JSON pool configur
|
|||
}
|
||||
```
|
||||
|
||||
## Installing packages from a private GitHub repository
|
||||
|
||||
Clusters can be configured to install packages from a private GitHub repository by setting the __githubAuthenticationToken__ property. If this property is blank only public repositories can be used. If a token is added then public and the private github repo can be used together.
|
||||
|
||||
When the cluster is created the token is passed in as an environment variable called GITHUB\_PAT on start-up which lasts the life of the cluster and is looked up whenever devtools::install_github is called.
|
||||
|
||||
```json
|
||||
{
|
||||
{
|
||||
"name": <your pool name>,
|
||||
"vmSize": <your pool VM size name>,
|
||||
"maxTasksPerNode": <num tasks to allocate to each node>,
|
||||
"poolSize": {
|
||||
"dedicatedNodes": {
|
||||
"min": 2,
|
||||
"max": 2
|
||||
},
|
||||
"lowPriorityNodes": {
|
||||
"min": 1,
|
||||
"max": 10
|
||||
},
|
||||
"autoscaleFormula": "QUEUE"
|
||||
},
|
||||
"rPackages": {
|
||||
"cran": [],
|
||||
"github": ["<project/some_private_repository>"],
|
||||
"githubAuthenticationToken": "<github_authentication_token>"
|
||||
},
|
||||
"commandLine": []
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
_More information regarding github authentication tokens can be found [here](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/)_
|
||||
|
||||
## Installing Packages per-*foreach* Loop
|
||||
You can also install packages by using the **.packages** option in the *foreach* loop. Instead of installing packages during pool creation, packages (and it's dependencies) can be installed before each iteration in the loop is run on your Azure cluster.
|
||||
|
||||
|
@ -35,5 +70,6 @@ results <- foreach(i = 1:number_of_iterations, .packages=c('package_1', 'package
|
|||
|
||||
Installing packages from github using this method is not yet supported.
|
||||
|
||||
|
||||
## Uninstalling packages
|
||||
Uninstalling packages from your pool is not supported. However, you may consider rebuilding your pool.
|
||||
|
|
|
@ -19,7 +19,7 @@ This section will provide information about how Azure works, how best to take ad
|
|||
|
||||
4. **Package Management** [(link)](./20-package-management.md)
|
||||
|
||||
Best practices for managing your R packages across your Azure pool
|
||||
Best practices for managing your R packages in code. This includes installation at the cluster or job level as well as how to use different package providers.
|
||||
|
||||
5. **Distributing your Data** [(link)](./21-distributing-data.md)
|
||||
|
||||
|
@ -36,3 +36,4 @@ This section will provide information about how Azure works, how best to take ad
|
|||
8. **Customize Cluster** [(link)](./30-customize-cluster.md)
|
||||
|
||||
Setting up your cluster to user's specific needs
|
||||
|
Загрузка…
Ссылка в новой задаче