Skip to content

Commit

Permalink
refactor: preset targets (#3)
Browse files Browse the repository at this point in the history
Signed-off-by: Toma Puljak <[email protected]>
  • Loading branch information
Tpuljak authored Oct 18, 2024
1 parent 43e91e0 commit 0343d25
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 23 deletions.
36 changes: 17 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

</div>


<h1 align="center">Daytona Azure Provider</h1>
<div align="center">
This repository is the home of the <a href="https://github.com/daytonaio/daytona">Daytona</a> Azure Provider.
Expand All @@ -24,36 +23,36 @@ This repository is the home of the <a href="https://github.com/daytonaio/daytona
<a href="https://x.com/Daytonaio">X</a>
</p>


The Azure Provider allows Daytona to create and manage workspace projects on Amazon virtual machines.

To use the Azure Provider for managing workspace projects, you'll need ensure that the token is associated with a
To use the Azure Provider for managing workspace projects, you'll need ensure that the token is associated with a
service principal with the `Contributor` role assigned to the relevant Azure subscription.
You can create a service principal with the Contributor role using the following Azure CLI command:

```shell
az ad sp create-for-rbac --role Contributor --scopes /subscriptions/<subscription-id>
```

Detailed instructions on generating and configuring the token can be found [here](https://learn.microsoft.com/en-us/cli/azure/azure-cli-sp-tutorial-1?tabs=bash)

## Target Options

| Property | Type | Optional | DefaultValue | InputMasked | DisabledPredicate |
|---------------------------|------------|-------------|-----------------------------------------------------|-----------------|---------------------|
| Region | String | true | centralus | false | |
| Image URN | String | true | Canonical:ubuntu-24_04-lts:server:latest | false | |
| VM Size | String | true | Standard_B2s | false | |
| Disk Type | String | true | StandardSSD_LRS | false | |
| Disk Size | Int | true | 30 | false | |
| Resource Group | String | true | | false | |
| Tenant Id | String | false | | true | |
| Client Id | String | false | | true | |
| Client Secret | String | false | | true | |
| Subscription Id | String | false | | true | |

| Property | Type | Optional | DefaultValue | InputMasked | DisabledPredicate |
| --------------- | ------ | -------- | ---------------------------------------- | ----------- | ----------------- |
| Region | String | true | centralus | false | |
| Image URN | String | true | Canonical:ubuntu-24_04-lts:server:latest | false | |
| VM Size | String | true | Standard_B2s | false | |
| Disk Type | String | true | StandardSSD_LRS | false | |
| Disk Size | Int | true | 30 | false | |
| Resource Group | String | true | | false | |
| Tenant Id | String | false | | true | |
| Client Id | String | false | | true | |
| Client Secret | String | false | | true | |
| Subscription Id | String | false | | true | |

### Default Targets
### Preset Targets

The Azure Provider has no default targets. Before using the provider you must set the target using the daytona target set command.
The Azure Provider has no preset targets. Before using the provider you must set the target using the daytona target set command.

## Code of Conduct

Expand All @@ -74,4 +73,3 @@ Afterwards, navigate to the [contributing guide](CONTRIBUTING.md) to get started

For more information on how to use and develop Daytona, talk to us on
[Slack](https://go.daytona.io/slack).

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute v1.0.0
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork v1.0.0
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0
github.com/daytonaio/daytona v0.38.0
github.com/daytonaio/daytona v0.40.0
github.com/docker/docker v27.2.0+incompatible
github.com/google/uuid v1.6.0
github.com/hashicorp/go-hclog v1.6.3
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -745,8 +745,8 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davidmz/go-pageant v1.0.2 h1:bPblRCh5jGU+Uptpz6LgMZGD5hJoOt7otgT454WvHn0=
github.com/davidmz/go-pageant v1.0.2/go.mod h1:P2EDDnMqIwG5Rrp05dTRITj9z2zpGcD9efWSkTNKLIE=
github.com/daytonaio/daytona v0.38.0 h1:T5EkDP8jf6GRPVHIExmfFLnNVunyjgobtcze4bdjmV8=
github.com/daytonaio/daytona v0.38.0/go.mod h1:ZZ+sA66/4715zoWUbtpjNb2VfueJ8uHxCZAayUhDzAw=
github.com/daytonaio/daytona v0.40.0 h1:+EUCUbKXJSP+QJOGglz38J8/Q9vtuItJb6YZx8Uv0p8=
github.com/daytonaio/daytona v0.40.0/go.mod h1:ZZ+sA66/4715zoWUbtpjNb2VfueJ8uHxCZAayUhDzAw=
github.com/dblohm7/wingoes v0.0.0-20240123200102-b75a8a7d7eb0 h1:vrC07UZcgPzu/OjWsmQKMGg3LoPSz9jh/pQXIrHjUj4=
github.com/dblohm7/wingoes v0.0.0-20240123200102-b75a8a7d7eb0/go.mod h1:Nx87SkVqTKd8UtT+xu7sM/l+LgXs6c0aHrlKusR+2EQ=
github.com/digitalocean/go-smbios v0.0.0-20180907143718-390a4f403a8e h1:vUmf0yezR0y7jJ5pceLHthLaYf4bA5T14B6q39S4q2Q=
Expand Down
2 changes: 1 addition & 1 deletion pkg/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func (a *AzureProvider) GetTargetManifest() (*provider.ProviderTargetManifest, e
return types.GetTargetManifest(), nil
}

func (a *AzureProvider) GetDefaultTargets() (*[]provider.ProviderTarget, error) {
func (a *AzureProvider) GetPresetTargets() (*[]provider.ProviderTarget, error) {
return new([]provider.ProviderTarget), nil
}

Expand Down

0 comments on commit 0343d25

Please sign in to comment.