From 63533c628bbdb76ced44b730cd9ca32c0b5ea9b3 Mon Sep 17 00:00:00 2001 From: Lizzy Thomson Date: Tue, 28 Mar 2023 12:30:43 -0600 Subject: [PATCH] Satellite/console: Reduce free account limits Update free account limits to segments(10k), storage(25gb), and bandwidth(25gb) Issue: https://github.com/storj/storj-private/issues/182 Change-Id: I59250fc9f1eebc812bc85ecfbc2924f8c4369064 --- satellite/admin/project_test.go | 14 +++++++------- satellite/console/projects.go | 6 +++--- scripts/testdata/satellite-config.yaml.lock | 6 +++--- .../onboardingTour/steps/PricingPlanStep.vue | 10 +++++----- .../src/views/registration/RegisterArea.vue | 2 +- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/satellite/admin/project_test.go b/satellite/admin/project_test.go index 57e8a5267c1c..71fc8d5cf2a2 100644 --- a/satellite/admin/project_test.go +++ b/satellite/admin/project_test.go @@ -47,7 +47,7 @@ func TestProjectGet(t *testing.T) { t.Run("OK", func(t *testing.T) { link := "http://" + address.String() + "/api/projects/" + project.ID.String() expected := fmt.Sprintf( - `{"id":"%s","publicId":"%s","name":"%s","description":"%s","userAgent":null,"ownerId":"%s","rateLimit":null,"burstLimit":null,"maxBuckets":null,"createdAt":"%s","memberCount":0,"storageLimit":"25.00 GB","bandwidthLimit":"25.00 GB","userSpecifiedStorageLimit":null,"userSpecifiedBandwidthLimit":null,"segmentLimit":150000}`, + `{"id":"%s","publicId":"%s","name":"%s","description":"%s","userAgent":null,"ownerId":"%s","rateLimit":null,"burstLimit":null,"maxBuckets":null,"createdAt":"%s","memberCount":0,"storageLimit":"25.00 GB","bandwidthLimit":"25.00 GB","userSpecifiedStorageLimit":null,"userSpecifiedBandwidthLimit":null,"segmentLimit":10000}`, project.ID.String(), project.PublicID.String(), project.Name, @@ -88,7 +88,7 @@ func TestProjectLimit(t *testing.T) { linkLimit := "http://" + address.String() + "/api/projects/" + project.ID.String() + "/limit" t.Run("Get OK", func(t *testing.T) { - assertGet(ctx, t, linkLimit, `{"usage":{"amount":"25.00 GB","bytes":25000000000},"bandwidth":{"amount":"25.00 GB","bytes":25000000000},"rate":{"rps":0},"maxBuckets":0,"maxSegments":150000}`, planet.Satellites[0].Config.Console.AuthToken) + assertGet(ctx, t, linkLimit, `{"usage":{"amount":"25.00 GB","bytes":25000000000},"bandwidth":{"amount":"25.00 GB","bytes":25000000000},"rate":{"rps":0},"maxBuckets":0,"maxSegments":10000}`, planet.Satellites[0].Config.Console.AuthToken) }) t.Run("Get Not Found", func(t *testing.T) { @@ -136,7 +136,7 @@ func TestProjectLimit(t *testing.T) { require.Equal(t, http.StatusOK, response.StatusCode) require.NoError(t, response.Body.Close()) - assertGet(ctx, t, linkLimit, `{"usage":{"amount":"1.0 TiB","bytes":1099511627776},"bandwidth":{"amount":"25.00 GB","bytes":25000000000},"rate":{"rps":0},"maxBuckets":0,"maxSegments":150000}`, planet.Satellites[0].Config.Console.AuthToken) + assertGet(ctx, t, linkLimit, `{"usage":{"amount":"1.0 TiB","bytes":1099511627776},"bandwidth":{"amount":"25.00 GB","bytes":25000000000},"rate":{"rps":0},"maxBuckets":0,"maxSegments":10000}`, planet.Satellites[0].Config.Console.AuthToken) req, err = http.NewRequestWithContext(ctx, http.MethodPut, linkLimit+"?usage=1GB", nil) require.NoError(t, err) @@ -147,7 +147,7 @@ func TestProjectLimit(t *testing.T) { require.Equal(t, http.StatusOK, response.StatusCode) require.NoError(t, response.Body.Close()) - assertGet(ctx, t, linkLimit, `{"usage":{"amount":"1.00 GB","bytes":1000000000},"bandwidth":{"amount":"25.00 GB","bytes":25000000000},"rate":{"rps":0},"maxBuckets":0,"maxSegments":150000}`, planet.Satellites[0].Config.Console.AuthToken) + assertGet(ctx, t, linkLimit, `{"usage":{"amount":"1.00 GB","bytes":1000000000},"bandwidth":{"amount":"25.00 GB","bytes":25000000000},"rate":{"rps":0},"maxBuckets":0,"maxSegments":10000}`, planet.Satellites[0].Config.Console.AuthToken) }) t.Run("Update Bandwidth", func(t *testing.T) { @@ -160,7 +160,7 @@ func TestProjectLimit(t *testing.T) { require.Equal(t, http.StatusOK, response.StatusCode) require.NoError(t, response.Body.Close()) - assertGet(ctx, t, linkLimit, `{"usage":{"amount":"1.00 GB","bytes":1000000000},"bandwidth":{"amount":"1.00 MB","bytes":1000000},"rate":{"rps":0},"maxBuckets":0,"maxSegments":150000}`, planet.Satellites[0].Config.Console.AuthToken) + assertGet(ctx, t, linkLimit, `{"usage":{"amount":"1.00 GB","bytes":1000000000},"bandwidth":{"amount":"1.00 MB","bytes":1000000},"rate":{"rps":0},"maxBuckets":0,"maxSegments":10000}`, planet.Satellites[0].Config.Console.AuthToken) }) t.Run("Update Rate", func(t *testing.T) { @@ -173,7 +173,7 @@ func TestProjectLimit(t *testing.T) { require.Equal(t, http.StatusOK, response.StatusCode) require.NoError(t, response.Body.Close()) - assertGet(ctx, t, linkLimit, `{"usage":{"amount":"1.00 GB","bytes":1000000000},"bandwidth":{"amount":"1.00 MB","bytes":1000000},"rate":{"rps":100},"maxBuckets":0,"maxSegments":150000}`, planet.Satellites[0].Config.Console.AuthToken) + assertGet(ctx, t, linkLimit, `{"usage":{"amount":"1.00 GB","bytes":1000000000},"bandwidth":{"amount":"1.00 MB","bytes":1000000},"rate":{"rps":100},"maxBuckets":0,"maxSegments":10000}`, planet.Satellites[0].Config.Console.AuthToken) }) t.Run("Update Buckets", func(t *testing.T) { @@ -186,7 +186,7 @@ func TestProjectLimit(t *testing.T) { require.Equal(t, http.StatusOK, response.StatusCode) require.NoError(t, response.Body.Close()) - assertGet(ctx, t, linkLimit, `{"usage":{"amount":"1.00 GB","bytes":1000000000},"bandwidth":{"amount":"1.00 MB","bytes":1000000},"rate":{"rps":100},"maxBuckets":2000,"maxSegments":150000}`, planet.Satellites[0].Config.Console.AuthToken) + assertGet(ctx, t, linkLimit, `{"usage":{"amount":"1.00 GB","bytes":1000000000},"bandwidth":{"amount":"1.00 MB","bytes":1000000},"rate":{"rps":100},"maxBuckets":2000,"maxSegments":10000}`, planet.Satellites[0].Config.Console.AuthToken) }) t.Run("Update Segment Limit", func(t *testing.T) { diff --git a/satellite/console/projects.go b/satellite/console/projects.go index b756420d95eb..a8fecbe898ed 100644 --- a/satellite/console/projects.go +++ b/satellite/console/projects.go @@ -66,19 +66,19 @@ type UsageLimitsConfig struct { // StorageLimitConfig is a configuration struct for default storage per-project usage limits. type StorageLimitConfig struct { - Free memory.Size `help:"the default free-tier storage usage limit" default:"150.00GB" testDefault:"25.00 GB"` + Free memory.Size `help:"the default free-tier storage usage limit" default:"25.00GB" testDefault:"25.00 GB"` Paid memory.Size `help:"the default paid-tier storage usage limit" default:"25.00TB" testDefault:"25.00 GB"` } // BandwidthLimitConfig is a configuration struct for default bandwidth per-project usage limits. type BandwidthLimitConfig struct { - Free memory.Size `help:"the default free-tier bandwidth usage limit" default:"150.00GB" testDefault:"25.00 GB"` + Free memory.Size `help:"the default free-tier bandwidth usage limit" default:"25.00GB" testDefault:"25.00 GB"` Paid memory.Size `help:"the default paid-tier bandwidth usage limit" default:"100.00TB" testDefault:"25.00 GB"` } // SegmentLimitConfig is a configuration struct for default segments per-project usage limits. type SegmentLimitConfig struct { - Free int64 `help:"the default free-tier segment usage limit" default:"150000"` + Free int64 `help:"the default free-tier segment usage limit" default:"10000"` Paid int64 `help:"the default paid-tier segment usage limit" default:"100000000"` } diff --git a/scripts/testdata/satellite-config.yaml.lock b/scripts/testdata/satellite-config.yaml.lock index 34c9fa9732cc..8172ee43ad6d 100755 --- a/scripts/testdata/satellite-config.yaml.lock +++ b/scripts/testdata/satellite-config.yaml.lock @@ -329,7 +329,7 @@ compensation.withheld-percents: 75,75,75,50,50,50,25,25,25,0,0,0,0,0,0 # console.terms-and-conditions-url: https://www.storj.io/terms-of-service/ # the default free-tier bandwidth usage limit -# console.usage-limits.bandwidth.free: 150.00 GB +# console.usage-limits.bandwidth.free: 25.00 GB # the default paid-tier bandwidth usage limit # console.usage-limits.bandwidth.paid: 100.00 TB @@ -341,13 +341,13 @@ compensation.withheld-percents: 75,75,75,50,50,50,25,25,25,0,0,0,0,0,0 # console.usage-limits.project.paid: 3 # the default free-tier segment usage limit -# console.usage-limits.segment.free: 150000 +# console.usage-limits.segment.free: 10000 # the default paid-tier segment usage limit # console.usage-limits.segment.paid: 100000000 # the default free-tier storage usage limit -# console.usage-limits.storage.free: 150.00 GB +# console.usage-limits.storage.free: 25.00 GB # the default paid-tier storage usage limit # console.usage-limits.storage.paid: 25.00 TB diff --git a/web/satellite/src/components/onboardingTour/steps/PricingPlanStep.vue b/web/satellite/src/components/onboardingTour/steps/PricingPlanStep.vue index c433c46a61c0..5a724d4d2833 100644 --- a/web/satellite/src/components/onboardingTour/steps/PricingPlanStep.vue +++ b/web/satellite/src/components/onboardingTour/steps/PricingPlanStep.vue @@ -44,26 +44,26 @@ const plans = ref([ new PricingPlanInfo( PricingPlanType.PRO, 'Pro Account', - '150 GB Free', + '25 GB Free', 'Only pay for what you need. $4/TB stored per month* $7/TB for bandwidth.', '*Additional per-segment fee of $0.0000088 applies.', null, null, - 'Add a credit card to activate your Pro Account.

Get 150GB free storage and bandwidth. Only pay for what you use beyond that.', + 'Add a credit card to activate your Pro Account.

Get 25GB free storage and bandwidth. Only pay for what you use beyond that.', 'No charge today', - '150GB Free', + '25GB Free', ), new PricingPlanInfo( PricingPlanType.FREE, 'Free Account', 'Limited', - 'Free usage up to 150GB storage and 150GB bandwidth per month.', + 'Free usage up to 25GB storage and 25GB bandwidth per month.', null, null, null, 'Start for free to try Storj and upgrade later.', null, - 'Limited 150', + 'Limited 25', ), ]); diff --git a/web/satellite/src/views/registration/RegisterArea.vue b/web/satellite/src/views/registration/RegisterArea.vue index 39313e49cfb7..f997dc869678 100644 --- a/web/satellite/src/views/registration/RegisterArea.vue +++ b/web/satellite/src/views/registration/RegisterArea.vue @@ -49,7 +49,7 @@ >
-

Get 150 GB Free

+

Get 25 GB Free