This repository has been archived by the owner on Feb 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Bug: simplify secrets loading (#133) * create aztklib object, move clusterlib and joblib to objects, update cli endpoints * fix errors in joblib * refactor SecretsConfig loading, refactor batch and blob client loading * fix tests * fix test and pylint errors * rename clusterlib to cluster and rename joblib to job * whitespace * rename aztklib to aztk and fix whitespace * fix get command * fixed issues with docker_auth and tests * Bug: Updated confusing cluster create success message (#80) * updated confusing success message * updated message and whitespace * remove old file * Update README.md (#136) * Feature/yaml space note (#134) * Update secrets.yaml.template * added spaces
- Loading branch information
Showing
18 changed files
with
903 additions
and
981 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
from aztk.clusterlib import Cluster | ||
from aztk.joblib import Job | ||
import aztk.azure_api as azure_api | ||
import aztk.config as config | ||
import aztk.error as error | ||
|
||
|
||
class Aztk: | ||
def __init__(self): | ||
secrets_config = config.SecretsConfig() | ||
secrets_config.load_secrets_config() | ||
|
||
blob_config = azure_api.BlobConfig( | ||
account_key=secrets_config.storage_account_key, | ||
account_name=secrets_config.storage_account_name, | ||
account_suffix=secrets_config.storage_account_suffix | ||
) | ||
batch_config = azure_api.BatchConfig( | ||
account_key=secrets_config.batch_account_key, | ||
account_name=secrets_config.batch_account_name, | ||
account_url=secrets_config.batch_service_url | ||
) | ||
|
||
self.batch_client = azure_api.make_batch_client(batch_config) | ||
self.blob_client = azure_api.make_blob_client(blob_config) | ||
|
||
self.cluster = Cluster( | ||
batch_client=self.batch_client, | ||
blob_client=self.blob_client, | ||
batch_config=batch_config, | ||
blob_config=blob_config, | ||
secrets_config=secrets_config | ||
) | ||
self.job = Job( | ||
batch_client=self.batch_client, | ||
blob_client=self.blob_client | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.