Skip to content

Commit

Permalink
update example package versions
Browse files Browse the repository at this point in the history
  • Loading branch information
philipkrueck committed Apr 15, 2024
1 parent 7647cd9 commit 85fca1e
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 65 deletions.
49 changes: 3 additions & 46 deletions examples/instance/dotnet/Program.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Pulumi;
using GenesisCloud.PulumiGenesisCloud;
using GenesisCloud.PulumiPackage.Genesiscloud;
using System.Threading.Tasks;

class GenesisCloudInstance : Stack
{
Expand All @@ -21,59 +22,15 @@ public GenesisCloudInstance()
Version = "ipv4"
});

var allow_ssh = new SecurityGroup("allow-ssh", new SecurityGroupArgs
{
Name = "allow-ssh",
Description = "Allow SSH",
Region = region,
Rules = new SecurityGroupRuleArgs
{
Direction = "ingress",
Protocol = "tcp",
PortRangeMin = 22,
PortRangeMax = 22
}
});

var allow_http = new SecurityGroup("allow-http", new SecurityGroupArgs
{
Name = "allow-http",
Description = "Allow HTTP",
Region = region,
Rules = new SecurityGroupRuleArgs
{
Direction = "ingress",
Protocol = "tcp",
PortRangeMin = 80,
PortRangeMax = 80
}
});

var startup_script = @"
<<EOF
#!/bin/bash
set -eo pipefail
# Add startup script
EOF"

var image_id = "2cd0e25f-a39e-4bc6-aa78-b4c40b87072a"

var instance = new Instance("my-pulumi-instance", new InstanceArgs
{
Name = "my-pulumi-instance",
Region = region,
Image = image_id,
Image = "ubuntu-ml-nvidia-pytorch",
PlacementOption = "AUTO",
DiskSize = 128,
Type = "vcpu-4_memory-12g_disk-80g_nvidia3080-1",
SshKeyIds = { ssh_key.Id },
SecurityGroupIds = { allow_ssh.Id, allow_http.Id },
Metadata = new InputMap<string>
{
{ "startup-script", startup_script }
},
FloatingIpId = floating_ip.Id
});
}
Expand Down
19 changes: 9 additions & 10 deletions examples/instance/dotnet/dotnet.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PackageReference Include="GenesisCloud.PulumiGenesisCloud" Version="*" />

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>

-ItemGroup>
w <PackageReference Include="GenesisCloud.Genesiscloud" Version="0.0.17" />
<PackageReference Include="Pulumi" Version="3.*" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="GenesisCloud.PulumiPackage.Genesiscloud" Version="0.0.18" />
<PackageReference Include="Pulumi" Version="3.*" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion examples/instance/go/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/genesiscloud/pulumi-genesiscloud/examples/instance/go
go 1.22.1

require (
github.com/genesiscloud/pulumi-genesiscloud/sdk v0.0.13
github.com/genesiscloud/pulumi-genesiscloud/sdk v0.0.18
github.com/pulumi/pulumi/sdk/v3 v3.111.1
)

Expand Down
4 changes: 2 additions & 2 deletions examples/instance/go/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FM
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
github.com/genesiscloud/pulumi-genesiscloud/sdk v0.0.13 h1:jhdYRpEqhaQm0z0NWLe2TLPsvpgE+IzsclON6FwXFCM=
github.com/genesiscloud/pulumi-genesiscloud/sdk v0.0.13/go.mod h1:V4Kfzb5o4c0fbsJMF5KdmftS2DsZ+jQAe1loI+PTP4o=
github.com/genesiscloud/pulumi-genesiscloud/sdk v0.0.18 h1:1QZqLoUUv61KLU09C4C6EGwO6ZKTPg8sRC2oA2Z1IZs=
github.com/genesiscloud/pulumi-genesiscloud/sdk v0.0.18/go.mod h1:V4Kfzb5o4c0fbsJMF5KdmftS2DsZ+jQAe1loI+PTP4o=
github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY=
github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4=
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI=
Expand Down
2 changes: 1 addition & 1 deletion examples/instance/py/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pulumi>=3.0.0,<4.0.0
pulumi-genesiscloud>=0.0.13,<0.0.14
pulumi-genesiscloud>=0.0.18,<0.0.19
8 changes: 4 additions & 4 deletions examples/instance/ts/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/instance/ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
},
"dependencies": {
"@pulumi/pulumi": "^3.0.0",
"@genesiscloud/pulumi-genesiscloud": "^0.0.13"
"@genesiscloud/pulumi-genesiscloud": "^0.0.18"
}
}

0 comments on commit 85fca1e

Please sign in to comment.