gcutilis installed this initializes the project:
gcutil getproject --project_id=varconcfd --cache_flag_values
which should give output looking something like this: An instance is added like this:
$ gcutil addinstance my-first-instance --wait_until_runningStatus check like this:
$ gcutil getinstance my-first-instanceshould give output something like this:
The default instance runs a recent version of Ubuntu (they also have CentOS 6 images available as well) so you can use the standard distribution package management tools to update and install programs.
The instance can be deleted with:
gcutil deleteinstance my-first-instance
Log in to a running instance with:
gcutil ssh my-first-instance
I followed the instructions for installing OpenFoam on Ubuntu from the OpenFoam site.
Once the user configuration is complete a simple test confirms things are installed and configured correctly.
The configuration can be saved to a custom image for later use using the
image_bundle.pytool that is installed on the default images.
sudo python /usr/share/imagebundle/image_bundle.py \
-r / -o /tmp/ --log_file=/tmp/abc.log
The image must be stored on Google Cloud Storage (this requires billing to be set up):
gsutil cp /tmp/4860e52466c0646558e252326e43db11cadac7c3.image.tar.gz gs://varconcfd
Then log out of the instance and add the image to the project.
gcutil addimage openfoamimage gs://varconcfd/4860e52466c0646558e252326e43db11cadac7c3.image.tar.gz --project_id=varconcfd
Once this is done then new instances can be initialized with the custom image.
gcutil addinstance --image=openfoamimage mynewinstance --project_id=varconcfd
Ready to run!