Jenkins , VSPhere plugin: how to clone a VM to a specific folder - jenkins-plugins

I'm using Jenkins with VSPhere plugin to clone a VM from existing VM/template. I'm interested to clone this VM to a folder, different from the folde of the existing VM. In which field should I add the path to this folder?
Tnx to all

So,
After some research, it comes out, that there is a bug in VSphere plugin, and it's not possible to do so using it.
But, there is a python library, called pyvmomi - it's pretty flexible and it gives this possibility.

Related

GAE: No longer able to update my Gaelyk project due to appcfg losing support

Recently tried to update my Gaelyk project (yes, it's old, but it works well and I still use it), but Google App Engine will no longer accept the update. The error message returned is "Deployments using appcfg are no longer supported. See https://cloud.google.com/appengine/docs/deprecations". The thing is, I never used appcfg to deploy my application; I used Gaelyk and Gradle. But obviously Gaelyk must have used appcfg under the covers.
I did download the replacement Google Cloud SDK, but this new tool is not similar at all to how Gaelyk and Gradle worked. Is there anything I can do to get Gaelyk to work anymore? Or is Gaelyk just dead and I need to rewrite my application (like in Node.js or something instead of Groovy).
This will be hard, however I will try to help you as possible. I think you may try to migrate it somehow to app.yaml configuration of GAE.
I am not sure what plugins are used in the project. From Gaelyk temple project I can see that it's using appengine-geb which, according to the documentation, behind the scenes, is using gradle-appengine-plugin (there is wrong link on this doc, but proper is bellow).
On the github of gradle-appengine-plugin I have found following.
There is a note:
NOTE: All App Engine users are encouraged to transition to the new
gradle plugin for their projects.
And in FAQ part there is following information:
How do I deploy with gcloud?
If you're using gcloud to deploy your application, the newest version of app deploy > doesn't support war
directories, you will need to provide it with an app.yaml OR you can
use the appengineStage task to create a directory that is deployable
in /build/staged-app
$ ./gradlew appengineStage
$ gcloud app deploy build/staged-app/app.yaml --project [app id]
--version [some version]
NOTES:
You must explicitly define all config files your want to upload
(cron.yaml, etc)
This does not work with EAR formatted projects.
I think the best option will be to migrate to new appenine plugin or if not possible try to implement is with gcloud app deploy command crating the config files manually (at least app.yaml). And for this migration I can provide you this document.
I hope you will manage somehow...
I can confirm that Serge's answer on the Gaelyk Groups site works; the same procedure that he figured out also worked for me. To summarize:
Run gradlew appengineRun as run previously with Gaelyk.
Copy all jar files inside the build\exploded-app\WEB-INF\lib folder into a \src\main\webapp\web-inf\lib folder (for me the new lib folder did not exist previously).
To deploy, use the new required gcloud tool, and instead of running gradlew appengineUpdate (which fails now), instead run
gcloud app deploy appengine-web.xml where that XML file can be found in your webapp/WEB-INF directory. I navigated to that directory to run the gcloud command, but you can use a relative path there if your working directory is elsewhere. (There are a number of optional flags associated with the gcloud app deploy command, but I didn't need any of them.)
Serge needed to use these instructions to convert datastore-indexes.xml to index.yaml and run gcloud app deploy index.yaml, however, I didn't need to do this because I had no datastores.

How to copy an exe file to App Engine (flex) with Go runtime?

My Go application needs to use a stand-alone executable, which I would like to copy it along with 'gcloud app deploy' command during deployment to GAE flex environment.
I have tried keeping the exe in the folder where other go files are located during deploy, but this doesn't seem to take the exe to the GAE flex
I tried using these 2 lines in Dockerfile and changed the "runtime: custom" in app.yaml, but that didn't fix either, as I am missing few more things it seems.
FROM gcr.io/google-appengine/golang
ADD test.exe /usr/local/bin/
Can anyone suggest, without/with Dockerfile, how can I copy the test.exe and also build the go application on a GAE flex environment?
EDIT:
I realize I should install the package (Debian package) on the GAE machine itself, and make it available for the App Engine app.
Any pointers on how to prepare the Dockerfile so that the Debian package is installed with all its dependencies and is also accessible to the app that I am deploying to App Engine?
You can copy a file using the command COPY.
However, it will not work, since the VM running the GAE flex instance uses Linux as seen in StackOverflow.
I also found this related thread, it may be helpful for you.
EDIT
Other options you have to deploy your application, which is in need of a windows executable file, is to create a VM instance with Windows and deploy your application there. Or you could find an alternative for that stand-alone executable for Linux, perhaps?

NoClassDefFoundError: Could not initialize OauthRawGcsServiceFactory on production environment

I'm using appengine-sdk 1.9.3.
In devserver, works in Eclipse and Ant normally.
When I deploy (update) to appengine (production environment), I get this error:
event.getResults(): [<pre>Error for /p7/formPanelServlet
java.lang.NoClassDefFoundError: Could not initialize class
com.google.appengine.tools.cloudstorage.oauth.OauthRawGcsServiceFactory
at com.google.appengine.tools.cloudstorage.GcsServiceFactory.createRawGcsService(GcsServiceFactory.java:42)
at com.google.appengine.tools.cloudstorage.GcsServiceFactory.createGcsService(GcsServiceFactory.java:34)
at com.bitvisio.p7.server.FormPanelServlet.<init>(FormPanelServlet.java:27)
At FormPanelServlet.java:27, the code is:
private final GcsService gcsService = GcsServiceFactory
.createGcsService(new RetryParams.Builder()
.initialRetryDelayMillis(10)
.retryMaxAttempts(10)
.totalRetryPeriodMillis(15000)
.build());
I put the lib appengine-gcs-client-0.3.9.jar in war/WEB-INF/lib. I think there is a problem with this lib.
Thanks for help.
Always use tools like Maven or Ivy to resolve dependencies for you. Copying JARs to war/WEB-INF/lib/ directory and editing .classpath file manually will be painful and may not help you always. If you use Eclipse & Google App Engine plugin, use Add Google APIs... as mentioned here - Google Plugin for Eclipse. In my case, adding Cloud Storage API via Google Plugin for Eclipse helped resolve this NoClassDefFoundError.
I had the same problem. I use Ivy to resolve dependencies and always get the latest.integration (with Maven use RELEASE) for revisions.
However I usually ignore transitive libraries. It looks like Google is expanding the API family - at least splitting out discrete functionality.
There are now quite a few transitive dependencies and it seems they released a new version of the GCS client around the same time as 1.9.3.
Getting all dependencies and packaging them in my deployment fixed my issue. I did not have the issue in development which made it more confusing.
You are facing this issue because you are not adding the some of the jar like
google-api-services-storage-v1-rev78-1.22.0.jar download link
joda-time-2.94.jar download link
guava-19.0.jar link to download
you can use the different version of jar according to your appengine-gcs-client jar file.
Note : Add all these jar and build path with the project and problem will get solve.

Which version of Eclipse works with PHP Google App Engine?

I've search in vain for about a month now and I can't get my PHP application pushed to Google App Engine, for the PHP platform. I've got the Java version set up nicely on my computer. I followed the instructions for GAE PHP here: https://developers.google.com/appengine/docs/php/gettingstarted/introduction
..but it's really confusing because it essentially tells me to install Eclipse made for PHP which is Luna, but the only versions of Eclipse that GAE supports is Kepler, Juno and Indigo (https://developers.google.com/eclipse/docs/getting_started), so I'm super confused.
I don't think you can install two different GAE plugins on a standard version of Eclipse (which is what I use for the Java GAE plugin).
I also tried (in vain, but it was worth a shot) to upload my app using my Java plugin/setup and obviously this was a terrible idea because all it does is just print the php script/code to the browser.
Any thoughts, brothas/sistas?
I have figured out how to push php files to GAE. There are essentially 3 ways.
Use appcfg.py. Run following command:
--appcfg.py update helloworld/, where helloworld is replaced by the name of the folder containing your project files. Make sure the path is relative to appcfg.py directory or an absolute path.
--Enter your Google username and password at the prompts.
**2. Use the App Engine Launcher, probably found in C:\Program Files (x86)\Google\google_appengine\launcher. Executable is called GoogleAppEngineLauncher.exe. Simply select the project in Launcher and click Deploy.
**3. Use Git. Create a local repository on your machine. Add a repo to your Github account, and follow these instructions: https://developers.google.com/appengine/docs/push-to-deploy#creating_a_cloud_project
**4. Use PhPStorm. Download PHPStorm for free for 30 days, or buy a student version/whatever version you quality for here: . Then follow these instructions: http://confluence.jetbrains.com/display/PhpStorm/Getting+Started+with+PhpStorm+as+Google+App+Engine+PHP+IDE. The only thing I haven't figured out is #5 - where to find the php-cgi.exe file. I can't provide a path for a file I don't have.
** denotes super easy and I have used successfully.
The Google Plugin for Eclipse is only for Java applications. For PHP applications, you'll want to use the Python/PHP SDK and either the command-line tools or the Launcher UI app for running the development server. You can still use Eclipse for editing your PHP source files.
RE #5 - "I can't provide a path for a file I don't have".
That was also my problem.
They are fond of pointing out that the SDK directory should contain dev_appserver.py and ‘google’ and ‘php’ packages but you don't find those in a simple search cause they are invisible. You have to muck through the installation directory.

Integrate Flurry Analytics into a MonoTouch app

I've installed XCode and MonoTouch and built a basic app.
I'm trying to integrate Flurry Analytics into my application. I signed up and downloaded the SDK but I don't know what to do with it. I think I need a binding library and I found this one on GitHub.
Should I clone that repository or is it already installed somewhere because I have MonoDevelop installed? Is there somewhere standard I should clone it to?
I then add a reference from my application to the FlurryAnalytics.dll. Do I need to do anything with the FlurryAnalytics SDK?
You only have to add a reference to FlurryAnalytics.dll in your project, no need to do anything with the SDK you downloaded.
But have in mind that the dll in that git repository might be somewhat out of date, in which case you should rebuild the dll (and in this case you do need the SDK). Here is what you need to do:
Find libFlurry.a in the SDK and put it in the repository's FlurryAnalytics/binding directory.
Open a terminal and navigate to the repository's FlurryAnalytics/binding directory.
Execute make.
This should build an updated FlurryAnalytics.dll.

Resources