From 2b868da2bf7e49cce4583c5082ec8f1287fb9fb7 Mon Sep 17 00:00:00 2001 From: Bradley Schofield Date: Thu, 24 Aug 2023 11:01:08 +0100 Subject: [PATCH 1/6] Add alot more details around service account key creation --- app/views/docs/migrations-firebase.phtml | 158 +++++++++++++++++++---- 1 file changed, 130 insertions(+), 28 deletions(-) diff --git a/app/views/docs/migrations-firebase.phtml b/app/views/docs/migrations-firebase.phtml index f8c236ea3..67cbd68e9 100644 --- a/app/views/docs/migrations-firebase.phtml +++ b/app/views/docs/migrations-firebase.phtml @@ -1,7 +1,7 @@

Moving your project from Firebase to Appwrite? Appwrite Migrations can help you streamline the process. - + Here's what you need to know to get started.

@@ -16,34 +16,34 @@

Supported resource types

- - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + +
UsersDatabasesDocumentsFilesFunctions
Firebase
UsersDatabasesDocumentsFilesFunctions
Firebase

Migrating to Appwrite from Firebase

- To begin migrating to Appwrite make sure to read the migration overview + To begin migrating to Appwrite make sure to read the migration overview and things to keep in mind sections above.

- +
  1. Create a new project and click on the Migrations tab. @@ -52,7 +52,7 @@ Click on the Create Migration button and select Firebase as your source.
  2. - Depending on where your Appwrite project is hosted, you'll need to use different methods to authorize with Firebase. + Depending on where your Appwrite project is hosted, you'll need to use different methods to authorize with Firebase. See the Cloud and Self-hosting sections for details.
  3. @@ -79,12 +79,114 @@ Click the gear icon to access your Project Settings.
  4. - Click Service Accounts, then Generate New Private Key. Don't share this key with anyone! + Click on Service Accounts, then click on the Manage service account permissions link redirecting you to the Google Cloud Console.
  5. - Once you've downloaded your private key, head back to Appwrite and click Manual Authentication. + Click on Create Service Account, give it any name, id and description you want, then click Continue.
  6. - Upload the JSON private key and follow the wizard. + Next you'll be prompted to grant the service account roles, grant the following roles:
  7. -
+ + + + + + + + + + + + + + + + + +
RoleReason
Firebase ViewerRead access to your entire Firebase project including Database and Storage
Identity Toolkit ViewerRead access to your users including their hash config
+
  • If you prefer to create a custom role, you can use the following permissions:
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    PermissionReason
    datastore.databases.getRead access to your Firestore database
    datastore.databases.listRead access to your Firestore database
    datastore.entities.getRead access to your Firestore database's documents
    datastore.entities.listRead access to your Firestore database's documents
    datastore.indexes.getRead access to your Firestore database's indexes
    datastore.indexes.listRead access to your Firestore database's indexes
    firebaseauth.configs.getRead access to your Firebase project's authentication configs
    firebaseauth.configs.getHashConfigRead access to your Firebase project's authentication configs including hash salt
    firebaseauth.configs.getSecretRead access to your Firebase project's authentication configs including secret
    firebaseauth.users.getRead access to your Firebase project's users
    identitytoolkit.tenants.getRead access to your Firebase project's users
    identitytoolkit.tenants.listRead access to your Firebase project's users
    storage.buckets.getRead access to your Firebase project's storage buckets
    storage.buckets.listRead access to your Firebase project's storage buckets
    storage.objects.getRead access to your Firebase project's storage objects
    storage.objects.listRead access to your Firebase project's storage objects
    +
  • + Click Done to create the service account. After that you'll be redirected back to the service accounts page. Select the service account you just created and click Keys. +
  • +
  • + Click Add Key and select Create new key. Select JSON as the key type and click Create. This will download a JSON file to your computer. +
  • +
  • + Upload the JSON file to Appwrite and follow the migration wizard. +
  • + \ No newline at end of file From f7fe08ed2e4eb7f0edeb74dea6aeea063d475166 Mon Sep 17 00:00:00 2001 From: "Vincent (Wen Yu) Ge" Date: Thu, 24 Aug 2023 11:51:36 -0400 Subject: [PATCH 2/6] Update app/views/docs/migrations-firebase.phtml --- app/views/docs/migrations-firebase.phtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/docs/migrations-firebase.phtml b/app/views/docs/migrations-firebase.phtml index 893659197..cf575693e 100644 --- a/app/views/docs/migrations-firebase.phtml +++ b/app/views/docs/migrations-firebase.phtml @@ -58,7 +58,7 @@ Click on Service Accounts, then click on the Manage service account permissions link redirecting you to the Google Cloud Console.
  • - Click on Create Service Account, give it any name, id and description you want, then click Continue. + Click on Create Service Account, give it a name, id and description you want, then click Continue.
  • Next you'll be prompted to grant the service account roles, grant the following roles: From 255224e3bfaaa36b219f548955bc0ea72030222f Mon Sep 17 00:00:00 2001 From: "Vincent (Wen Yu) Ge" Date: Thu, 24 Aug 2023 11:51:41 -0400 Subject: [PATCH 3/6] Update app/views/docs/migrations-firebase.phtml --- app/views/docs/migrations-firebase.phtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/docs/migrations-firebase.phtml b/app/views/docs/migrations-firebase.phtml index cf575693e..c7a40ab3a 100644 --- a/app/views/docs/migrations-firebase.phtml +++ b/app/views/docs/migrations-firebase.phtml @@ -61,7 +61,7 @@ Click on Create Service Account, give it a name, id and description you want, then click Continue.
  • - Next you'll be prompted to grant the service account roles, grant the following roles: + Next you'll be prompted to grant the service account roles. You need to grant the following roles.
  • From d33d2230e3c66c3b98428cdd81db0b73304363c2 Mon Sep 17 00:00:00 2001 From: "Vincent (Wen Yu) Ge" Date: Thu, 24 Aug 2023 11:51:46 -0400 Subject: [PATCH 4/6] Update app/views/docs/migrations-firebase.phtml --- app/views/docs/migrations-firebase.phtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/docs/migrations-firebase.phtml b/app/views/docs/migrations-firebase.phtml index c7a40ab3a..e131a7826 100644 --- a/app/views/docs/migrations-firebase.phtml +++ b/app/views/docs/migrations-firebase.phtml @@ -73,7 +73,7 @@ - + From 6f67e62e39902e51efc8924839c801f8ca77e287 Mon Sep 17 00:00:00 2001 From: "Vincent (Wen Yu) Ge" Date: Thu, 24 Aug 2023 11:51:51 -0400 Subject: [PATCH 5/6] Update app/views/docs/migrations-firebase.phtml --- app/views/docs/migrations-firebase.phtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/docs/migrations-firebase.phtml b/app/views/docs/migrations-firebase.phtml index e131a7826..cb27cd23b 100644 --- a/app/views/docs/migrations-firebase.phtml +++ b/app/views/docs/migrations-firebase.phtml @@ -77,7 +77,7 @@ - +
    Firebase ViewerRead access to your entire Firebase project including Database and Storage
    Read access to your entire Firebase project including Database and Storage.
    Identity Toolkit Viewer
    Identity Toolkit ViewerRead access to your users including their hash config
    Read access to your users including their hash config.
    From 124826a67e84e87a08917c78a3ddfeeb78bdfe29 Mon Sep 17 00:00:00 2001 From: "Vincent (Wen Yu) Ge" Date: Thu, 24 Aug 2023 16:08:08 +0000 Subject: [PATCH 6/6] fix some style and grammar --- .../docs/migrations-cloud-to-local.phtml | 2 +- app/views/docs/migrations-firebase.phtml | 47 ++++++++++--------- .../docs/migrations-local-to-cloud.phtml | 2 +- 3 files changed, 28 insertions(+), 23 deletions(-) diff --git a/app/views/docs/migrations-cloud-to-local.phtml b/app/views/docs/migrations-cloud-to-local.phtml index 801d93c0e..743efb54b 100644 --- a/app/views/docs/migrations-cloud-to-local.phtml +++ b/app/views/docs/migrations-cloud-to-local.phtml @@ -1,5 +1,5 @@

    - Moving to a self-hosted instance? We've got you covered. + If you're moving your projects from Appwrite Cloud to self-hosted, we've got you covered. Migrations makes it as easy as a couple clicks to move all of your Appwrite Cloud project data to a self-hosted instance.

    diff --git a/app/views/docs/migrations-firebase.phtml b/app/views/docs/migrations-firebase.phtml index cb27cd23b..c5d234175 100644 --- a/app/views/docs/migrations-firebase.phtml +++ b/app/views/docs/migrations-firebase.phtml @@ -36,13 +36,15 @@ -

    Appwrite Cloud

    +

    Migrate to Cloud

    To simplify the migration process we have created an OAuth application that will allow you to sign in with Google and automatically discover your Firebase projects. Simply select the source project and follow the migration wizard.

    -

    Migrating to Appwrite Self-Hosted

    +

    After completing the migration wizard, migration will begin. Return to step 4 of the migration steps.

    + +

    Migrating to Self-Hosted

    If you are self-hosting Appwrite you will need to create a service account in your Firebase project and download the JSON file.

    @@ -63,7 +65,7 @@
  • Next you'll be prompted to grant the service account roles. You need to grant the following roles.
  • - +
    @@ -81,8 +83,8 @@
    Role
    -
  • If you prefer to create a custom role, you can use the following permissions:
  • - +
  • If you prefer to create a custom role, you can use the following permissions.
  • +
    @@ -92,67 +94,67 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
    Permission
    datastore.databases.getRead access to your Firestore databaseRead access to your Firestore database.
    datastore.databases.listRead access to your Firestore databaseRead access to your Firestore database.
    datastore.entities.getRead access to your Firestore database's documentsRead access to your Firestore database's documents.
    datastore.entities.listRead access to your Firestore database's documentsRead access to your Firestore database's documents.
    datastore.indexes.getRead access to your Firestore database's indexesRead access to your Firestore database's indexes.
    datastore.indexes.listRead access to your Firestore database's indexesRead access to your Firestore database's indexes.
    firebaseauth.configs.getRead access to your Firebase project's authentication configsRead access to your Firebase project's authentication configs.
    firebaseauth.configs.getHashConfigRead access to your Firebase project's authentication configs including hash saltRead access to your Firebase project's authentication configs including hash salt.
    firebaseauth.configs.getSecretRead access to your Firebase project's authentication configs including secretRead access to your Firebase project's authentication configs including secret.
    firebaseauth.users.getRead access to your Firebase project's usersRead access to your Firebase project's users.
    identitytoolkit.tenants.getRead access to your Firebase project's usersRead access to your Firebase project's users.
    identitytoolkit.tenants.listRead access to your Firebase project's usersRead access to your Firebase project's users.
    storage.buckets.getRead access to your Firebase project's storage bucketsRead access to your Firebase project's storage buckets.
    storage.buckets.listRead access to your Firebase project's storage bucketsRead access to your Firebase project's storage buckets.
    storage.objects.getRead access to your Firebase project's storage objectsRead access to your Firebase project's storage objects.
    storage.objects.listRead access to your Firebase project's storage objectsRead access to your Firebase project's storage objects.
    @@ -165,4 +167,7 @@
  • Upload the JSON file to Appwrite and follow the migration wizard.
  • +
  • + After completing the migration wizard, migration will begin. Return to step 4 of the migration steps. +
  • \ No newline at end of file diff --git a/app/views/docs/migrations-local-to-cloud.phtml b/app/views/docs/migrations-local-to-cloud.phtml index 5cfee4cb8..96cd51ec3 100644 --- a/app/views/docs/migrations-local-to-cloud.phtml +++ b/app/views/docs/migrations-local-to-cloud.phtml @@ -1,5 +1,5 @@

    - Making the move to Appwrite Cloud? We've got your back. + If you're moving your self-hosted projects to Appwrite Cloud, we've got your back. Migrations makes it as easy as a couple clicks to move all of your self-hosted project data to a Cloud instance.