If you have multiple projects or organization and you want to clone a machine that is already configured, you can create an image of the instance of the machine. But, you will have to share the access to the external project and organization. Here is how to do it :
Share the image to the organization in the Images and in IAM
In both IAM and Image (VM) you will have to share the access Compute Image User
Start the VM using the shared image from another project / organization
If you have a database on Google Cloud and you want to import and export some tables to another database, you will need a database explorer to export your .SQL backup.
Export the tables you want in database
Google Cloud interface only allow to export all a database or a specific database, but not tables
As you can see you don’t have the option to select tables. To do so, you will have to connect the database with a SQL explorer. In MySQL Workbench you should go in Server > Data Export
Then you should be able to select the tables you want
Import the SQL file to Google Cloud
You will need to upload the SQL file to Google Cloud in order to import it. In order to do it, go to Google Cloud > Cloud Storage, create the bucket if it doesn’t exist yet :
Then, you can go on Google Cloud > SQL > Import
And then you should have imported successfully the tables on the selected database. You should check it in Operations
In case of errors, check the error in Operations, and modify the .SQL file with a text editor, search the error in the SQL file and remove the lines, and repeat the process (upload it again to Google Cloud Storage and import the SQL file again)
We often need images in our React or Angular app, but putting them in the project is not clean. So we can use Google Cloud with Cloud Storage for the images on your app.
There are many advantages of using Cloud Storage to expose public images : – Real time maintenance (upload, delete, change, …) – You don’t need any commit on your git (if you commit images on your Github / Gitlab for example) – Clean project, only code files – Light project repository to commit, images are heavy quickly
Create a Bucket
First, you need to create a Bucket (it’s like a big folder) if you don’t already have one.
Switch to Uniform access control
Then, to make your Bucket public, go to the Permissions tab, and change the access control to Uniform :
Add public access using by adding a Reader role for allUsers
You can now use you image anywhere, it’s on internet and anyone can see it with the URL, so you can use it to store images for your React / Angular app, all images will work.
There are some differences between Google Cloud and AWS when you want to deploy your function for your API.
My point of view is that Google Cloud function may be a bit more simple to deploy but AWS is in a way the most reliable and complete cloud environnement nowadays.
On both cloud environnement you can upload the code with a ZIP, you can so use the same way to adjust your code for AWS:
Differences between Google Cloud functions and AWS Lambda (Node.JS)
THE DEPENDENCIES – In Google Cloud, the dependencies are automatically installed from the package.json file – In AWS, you need to install the dependencies with npm or yarn, that will build the node_modules folder If you don’t have the node_modules folder, your Lamdba function will not work with the following error: