Skip to content

Commit 3b5d401

Browse files
committed
feat(cloud_hub): Add organizations service
- Implements `celest.cloud.v1alpha1.Organizations` - Adds tables for organizations and projects - Updates database for Cloud Auth changes - Adds tests for OrganizationsService
1 parent 548ae1e commit 3b5d401

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+8696
-475
lines changed

apps/cli/fixtures/standalone/auth/goldens/ast.json

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/cli/fixtures/standalone/data/goldens/ast.json

Lines changed: 13 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/cli/fixtures/standalone/data/goldens/ast.resolved.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/cli/fixtures/standalone/data/goldens/celest.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/cli/lib/src/commands/init_command.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ final class InitCommand extends CelestCommand with Configure, ProjectCreator {
9797
stdout.writeln();
9898
cliLogger.success('🚀 To start a local development server, run:');
9999
cliLogger
100-
..write(Platform.lineTerminator)
101-
..write(' $command${Platform.lineTerminator}')
102-
..write(Platform.lineTerminator);
100+
..info(Platform.lineTerminator)
101+
..info(' $command${Platform.lineTerminator}')
102+
..info(Platform.lineTerminator);
103103

104104
return 0;
105105
}

services/celest_cloud_hub/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ FROM scratch
5656
COPY --from=build /runtime/ /
5757
COPY --from=build /app/cloud_hub /app/cloud_hub
5858
COPY --from=build /app/libsqlite3.so /app/libsqlite3.so
59-
COPY --from=build /usr/local/bin/flyctl /usr/local/bin/fly
59+
COPY --from=build /usr/local/bin/flyctl /usr/local/bin/flyctl
6060

6161
ENV PORT=8080
6262
EXPOSE $PORT

services/celest_cloud_hub/analysis_options.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ analyzer:
55
avoid_print: ignore
66
implementation_imports: ignore
77
exclude:
8-
- lib/src/proto
8+
- lib/src/proto/**

services/celest_cloud_hub/bin/cloud_hub.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import 'package:celest_cloud_hub/src/gateway/gateway.dart';
1717
import 'package:celest_cloud_hub/src/project.dart';
1818
import 'package:celest_cloud_hub/src/services/health_service.dart';
1919
import 'package:celest_cloud_hub/src/services/operations_service.dart';
20+
import 'package:celest_cloud_hub/src/services/organizations_service.dart';
2021
import 'package:celest_cloud_hub/src/services/project_environments_service.dart';
2122
import 'package:celest_core/_internal.dart';
2223
import 'package:grpc/grpc.dart' as grpc;
@@ -63,9 +64,10 @@ Future<void> main() async {
6364

6465
final server = grpc.Server.create(
6566
services: [
66-
ProjectEnvironmentsService(),
67-
OperationsService(db, authorizer),
6867
HealthService(),
68+
OperationsService(db, authorizer),
69+
OrganizationsService(db, authorizer),
70+
ProjectEnvironmentsService(db, authorizer),
6971
],
7072
interceptors: [
7173
(call, method) async {

services/celest_cloud_hub/build.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ targets:
1111
enabled: true
1212
generate_for:
1313
- lib/src/database/**
14+
- lib/src/model/**
1415
options: &options
1516
sql:
1617
dialect: sqlite
@@ -23,5 +24,6 @@ targets:
2324
enabled: true
2425
generate_for:
2526
- lib/src/database/**
27+
- lib/src/model/**
2628
# We use yaml anchors to give the two builders the same options
2729
options: *options
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
3+
# This script launches the Celest Cloud Hub to Fly.io
4+
#
5+
# Usage:
6+
# ./deploy.sh
7+
8+
fly launch \
9+
--yaml \
10+
--name cloud-hub \
11+
--org celest-809 \
12+
--image celestdev/cloud-hub:latest \
13+
--env "CLOUD_HUB_DATABASE_HOST=file::memory:" \
14+
--region lax \
15+
--regions lax,ord \
16+
--vm-size performance-8x

0 commit comments

Comments
 (0)