Startup Scripts on Google Compute Engine - google-cloud-storage

My startup scripts stored in Cloud Storage no longer seem to execute on my Compute Engine instances.
I use the startup-script-url tag to pass in the shell script stored in Cloud Storage. None of my compute engine instances are executing the startup scripts. I'm using Ubuntu images and there is no /var/log/startupscript.log file. I'm providing the proper link to the shell script because if I run:
sudo /usr/share/google/run-startup-scripts
the instance starts executing the contents of my shell script. These same scripts worked on startup as of last Thursday (9/22) but now they don't. I haven't made any changes to my scripts in that time.
Any idea what is going on? The other questions I found pertaining to this were quite old and did not seem to have an accepted solution.

From the comments it looks like you've figured this out, but there was a problem in a recent update to Ubuntu 16.04 that broke startup scripts.
The problematic image was rolled-back, but updating packages will cause the problem to occur as well.
https://github.com/GoogleCloudPlatform/compute-image-packages/issues/342

Related

Cloud Shell , I should install CBT each time i open cloud shell the day after

To use any GCloud componet, I have installed on Cloud Shell just once, and i could use it each time i open cloud shell. But for CBT component for BigTable, I don't know what is happening that each time I close the browser the CBT tool is not installed any more and I should re-install it. The problem does not appear immediately, generally each day I should install it and it exist between installed components for whole day, and the day after I see it is not any more installed!
Any idea ?
This problem is caused by Google terminating idle Cloud Shell instances when they are not being used. Termination happens after about 60 minutes of non-use.
Only data stored in the $HOME directory persists after a new Cloud Shell is launched.
To install cbt the following steps are recommended:
gcloud components update
gcloud components install cbt
Since these components are not being installed in $HOME, they do not persist after Cloud Shell is terminated.
There are two methods that I recommend to solve this problem:
Google Cloud Shell is a Docker container. You can modify the docker image to customize to fit your needs. This method will allow you to install packages, tools, etc that are not located in your $HOME directory.
Modify .bashrc to run a script located in the $HOME directory to install cbt each time a new instance is created.
Note: It appears as of now that cbt is included in the default Cloud Shell instance. This answer should help others understand what is happening and be able to install other programs, tools, etc. persistently.

Can't running EplSite on Windows

I have problem with running EplSite program. This program is written in Perl. I'm new in Perl. I tried to run it, but Perl command line displays errors. Can you help me? https://sourceforge.net/projects/eplsiteetl/
CODE one of many files: http://pastebin.com/yM9srKGn
Don't waste your time with EplSite ETL. There's no useful documentation. I've wasted two days trying to install it with no success. Maybe something would work if there was some info about using hypertextperl.pl (especially with Apache server on Windows) but link to developer's site is dead.
Just find some other software for ETL, because if you somehow manage to install Eplsite ETL you would have to guess how to use it properly. It's not worth the time and effort.

Updating PS Modules

We have some 200+ standalone virtual servers each practically identical, and there are various scripts we need to run against some or all of these at points.
To date I've been messing around with the profile but modules are a far neater solution so this is my next project.
The only question I don't seem to be able to find an answer for is how to update it once it's installed. Is there some built-in way to do this or do I need to set up my own means of copying in updated files?
Servers are Win2008R2 running PowerShell 4

IPython starting ipclusters

I'm using this amazing IPython notebook. I'm very interested into parallel computing right now and would like to use MPI with IPython (and MPI4py). But I can't start a cluster with
ipcluster start -n 4
on Windows7. I just get back "failed to create process". If I use the notebook and start a cluster in the "Clusters" register it's all working fine. But with cmd (even with admin rights) I just get this message. Same with all attempts of using MPI (MPICH2). All path vars are set. Maybe this problem has no connection to Python at all...
I can't say anything about IPython's parallel features, but if you're having problems with MPI in Windows in general, I would offer these suggestions. I've had quite a few issues in the past in trying to get MPI working in Windows. The most convenient method for me in the past has been to use an OpenMPI Windows binary http://www.open-mpi.org/software/ompi/v1.6/. These are now only available in previous releases. And even then, you might have to try more than one before you find one that works. I don't know why, but the latest didn't work on my machine. The release before that one did, however. After this, you have to call mpicc and mpiexec from the Microsoft Visual Studio Command Prompt or it won't work (without a lot of other stuff).
After you have verified that MPI is working, you can try installing mpi4py separately and see if that works. In my experience, sometimes this has worked fine and sometimes I've had to wrestle with configurations. You might just try your luck with an unofficial, prepackaged binary (for example, http://www.lfd.uci.edu/~gohlke/pythonlibs/).
Hope this helps!

Run part of a build script on a windows box and the rest on linux

My build script runs on linux and invokes things like gcc, shell scripts, etc.
Part of the solution is written in mono and could be compiled easily on linux.
But I want to obfuscate the code. Not manually, but as part of the build process.
Therefore I need to invoke Dotfuscator and Dotfuscator so far only runs on windows.
Is there a good solutions to invoke command line based workers/build scripts remotely from linux on a windows machine? I don't just want to run a command remotely, but also pass files along.
Like a windows service that is accessed using simple curl-uploads of a tar file, creates a temp folder for each concurrently connected client (or blocks concurrent calls) and unpacks the file, invokes something on these files and packages the result again as tar file to give it back to the caller? And clears the temp file even in case of failures?
Maybe someone knows a good solution that saves me from writing this myself!
It should not be so uncommon that a build process spans multiple platforms, yet common build server answers I found mainly talk about only one build script.
Also think about running e.g. the nsis setup builder from a linux driven build script, if part of your solution has a tiny windows component