Coder Social home page Coder Social logo

samkenxstream / appengine-plugins-core Goto Github PK

View Code? Open in Web Editor NEW

This project forked from googlecloudplatform/appengine-plugins

0.0 1.0 0.0 1.6 MB

A client Java library to manage App Engine Java applications for any project that performs App Engine Java application management. For example, the Maven, Gradle and Eclipse App Engine plugins, custom user tools, etc.

License: Apache License 2.0

Java 99.78% Shell 0.17% Batchfile 0.06%

appengine-plugins-core's Introduction

experimental

Google App Engine Plugins Core Library

IMPORTANT: This library is used by Google internal plugin development teams to share App Engine related code. Its use for any other purpose is highly discouraged and unsupported. Visit our App Engine documentation for more information on Google supported clients for App Engine administration.

Requirements

This library requires Java 1.8 or higher to run. This library requires Maven and Java 1.8 or higher to build.

You must also install the Cloud SDK command line interface (gcloud). If it isn't installed yet, follow these instructions.

You must also install the app-engine-java component:

gcloud components install app-engine-java

Supported operations

The library implements the following operations:

  • Deploy an application to standard or flexible environment
  • Stage an application for deployment
  • Run an application on the local server synchronously or asynchronously

How to use

Build the library using the "mvn clean install" command at the repository root directory, where the pom.xml file is located. This produces the appengine-plugins-core-version-SNAPSHOT.jar file in the "target" directory that you can add to your application's class path.

To deploy a new version, a client calls the library in the following way:

// All operations require the cloud SDK
CloudSdk cloudSdk = new CloudSdk.Builder().sdkPath(some-path).javaHome(some-java-home).build();


// Operations that use gcloud command line are initiated by the Gcloud object.
Gcloud gcloud = Gcloud.builder(sdk).setMetricsEnvironment("asdf","12").setCredentialFile(some-file).build()

// Similarly for AppCfg and the DevAppServer
AppCfg appcfg = AppCfg.builder(sdk).build()
DevServers localRun = DevServers.builder(sdk).build()

// Operations are started as processes, access to these processes is handled
// by implementations of ProcessHandler. To continue to interface with processes
// as before, use LegacyProcessHandler.
ProcessHandler handler = LegacyProcessHandler.builder()...configureHandler...build();
gcloud.newDeployment(handler).deploy(myDeployConfiguration);

SDK Manager

This library provides a mechanism for installing, adding components to, and updating the Cloud SDK. The operations are intended to run asynchronously, either on an executor or through mechanisms provided by an IDE.

// Create a new Managed SDK instance
ManagedCloudSdk sdk = ManagedCloudSdk.newManagedSdk("123.123.123") // SDK fixed at version.
ManagedCloudSdk sdk = ManagedCloudSdk.newManagedSdk() // 'LATEST' sdk, can be updated.

// Implement the listener interface to listen to operation output
MessageListener listener = new MessageListener() {...};

// Always check if operations are needed before running them
if (!sdk.isInstalled()) {
  sdk.newInstaller().install(listener);
}

// use SdkComponent to reference a Cloud Sdk component
if (!sdk.hasComponent(SdkComponent.APP_ENGINE_JAVA)) {
  sdk.newComponentInstaller().installComponent(SdkComponent.APP_ENGINE_JAVA, listener);
}

// updates will only occur on 'LATEST' sdks
if (!sdk.isUpToDate) {
  sdk.newUpdater().update(listener);
}

// You can then create an SDK from a managed SDK instance
new CloudSdk.Builder().sdkPath(sdk.getSdkHome())...;

appengine-plugins-core's People

Contributors

abbiefarr avatar akerekes avatar briandealwis avatar chanseokoh avatar coollog avatar dependabot[bot] avatar elefeint avatar elharo avatar etanshaul avatar frantello avatar ivanporty avatar joaoandremartins avatar loosebazooka avatar ludoch avatar meltsufin avatar mpeddada1 avatar nkibler avatar patflynn avatar peterlin741 avatar suztomo avatar tadcordle avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.