Create DNS for the defined app and environment.
487509
def create_dns(self):
        """"""
        utils.banner("Creating DNS")
        elb_subnet = self.configs[self.env]['elb']['subnet_purpose']
        regions = self.configs[self.env]['regions']
        failover = self.configs[self.env]['dns']['failover_dns']
        primary_region = self.configs['pipeline']['primary_region']
        regionspecific_dns = self.configs[self.env]['dns']['region_specific']

        dnsobj = dns.SpinnakerDns(
            app=self.app, env=self.env, region=self.region, prop_path=self.json_path, elb_subnet=elb_subnet)

        if len(regions) > 1 and failover:
            dnsobj.create_elb_dns(regionspecific=True)
            dnsobj.create_failover_dns(primary_region=primary_region)
        else:
            if regionspecific_dns:
                dnsobj.create_elb_dns(regionspecific=True)

            if self.region == primary_region:
                dnsobj.create_elb_dns(regionspecific=False)
176735
def create(self):
        
        self.service.create()

        # Set env vars for immediate use
        zone_id = predix.config.get_env_key(self.use_class, 'zone_id')
        zone = self.service.settings.data['zone']['http-header-value']
        os.environ[zone_id] = zone

        uri = predix.config.get_env_key(self.use_class, 'uri')
        os.environ[uri] = self.service.settings.data['uri']
1283669
def init_app(self, app):
        
        app.extensions = getattr(app, 'extensions', {})
        app.extensions['docker.client'] = None

        app.config.setdefault('DOCKER_URL', None)
        app.config.setdefault('DOCKER_VERSION', '1.16')
        app.config.setdefault('DOCKER_TIMEOUT', 30)
        app.config.setdefault('DOCKER_TLS', False)
        app.config.setdefault('DOCKER_TLS_VERIFY', True)
        app.config.setdefault('DOCKER_TLS_SSL_VERSION', None)
        app.config.setdefault('DOCKER_TLS_ASSERT_HOSTNAME', None)

        app.config.setdefault('DOCKER_TLS_CERT_PATH', None)
        app.config.setdefault('DOCKER_TLS_CLIENT_CERT', None)
        app.config.setdefault('DOCKER_TLS_CA_CERT', None)
662725
def init_app(self, app):
        
        if not hasattr(app, 'extensions'):
            app.extensions = {}

        service_name = app.config.get('GSSAPI_SERVICE_NAME', 'HTTP')
        hostname = app.config.get('GSSAPI_HOSTNAME', socket.getfqdn())
        principal = '{}@{}'.format(service_name, hostname)
        name = gssapi.Name(principal, gssapi.NameType.hostbased_service)

        app.extensions['gssapi'] = {
            'creds': gssapi.Credentials(name=name, usage='accept'),
        }
1173397
def setup(app):
    """"""
    app.add_config_value('jsdoc_source_root', '..', 'env')
    app.add_config_value('jsdoc_output_root', 'javascript', 'env')
    app.add_config_value('jsdoc_exclude', [], 'env')
    app.connect('builder-inited', generate_docs)
345280
def setup(self, app):
        
        super().setup(app)

        if isinstance(self.cfg.template_folders, str):
            self.cfg.template_folders = [self.cfg.template_folders]

        else:
            self.cfg.template_folders = list(self.cfg.template_folders)

        self.ctx_provider(lambda: {'app': self.app})
        self.env = Environment(debug=app.cfg.DEBUG, **self.cfg)
564619
def create_domainalias(self, domainid, data):
        """"""
        return self.api_call(
            ENDPOINTS['domainaliases']['new'],
            dict(domainid=domainid),
            body=data)
308016
def create(cls, fqdn, flags, algorithm, public_key):
        """"""
        fqdn = fqdn.lower()

        params = {
            'flags': flags,
            'algorithm': algorithm,
            'public_key': public_key,
        }

        result = cls.call('domain.dnssec.create', fqdn, params)

        return result
693396
def from_environ(cls, environ=os.environ):
    """"""
    base_path, unused = (environ['PATH_INFO'].rsplit('/', 1) + [''])[:2]
    return cls(
        environ['HTTP_X_APPENGINE_TASKNAME'],
        environ['HTTP_X_APPENGINE_QUEUENAME'],
        base_path)
463811
def init_app(self, app):
        """"""

        self.app = app
        self.app.apscheduler = self

        self._load_config()
        self._load_jobs()

        if self.api_enabled:
            self._load_api()
14743
def app(environ, start_response):
    """"""
    r = HttpRequestHandler(environ, start_response, Router).dispatch()
    return r
189174
def create(self, environments):
        

        data = {'environments': environments}
        return super(ApiEnvironment, self).post('api/v3/environment/', data)
588437
def init_app(self, app):
        """"""
        prefix_len = len(self.prefix)
        for varname, value in os.environ.items():
            if not varname.startswith(self.prefix):
                continue

            # Prepare values
            varname = varname[prefix_len:]
            value = value or app.config.get(varname)

            # Evaluate value
            try:
                value = ast.literal_eval(value)
            except (SyntaxError, ValueError):
                pass

            # Set value
            app.config[varname] = value
1173445
def init_app(self, app):
        """"""
        app.config.setdefault("SSLIFY_SUBDOMAINS", False)
        app.config.setdefault("SSLIFY_PERMANENT", False)
        app.config.setdefault("SSLIFY_SKIPS", None)

        self.hsts_include_subdomains = (
            self.hsts_include_subdomains or app.config["SSLIFY_SUBDOMAINS"]
        )
        self.permanent = self.permanent or self.app.config["SSLIFY_PERMANENT"]
        self.skip_list = self.skip_list or self.app.config["SSLIFY_SKIPS"]

        app.before_request(self.redirect_to_ssl)
        app.after_request(self.set_hsts_header)
138417
def setup_app(command, conf, vars):
    """"""
    # Don't reload the app if it was loaded under the testing environment
    if not pylons.test.pylonsapp:
        load_environment(conf.global_conf, conf.local_conf)
67688
def UpdateDNS(self, domain, environment):
        """"""
        self.dns_set_conf(domain, self.dns.config,
                          environment, self.dns.token)
594876
function start(CB, env) {

    var app = this;

    /*
     |--------------------------------------------------------------------------
     | Register The Environment Variables
     |--------------------------------------------------------------------------
     |
     | Here we will register all of the ENV variables into the
     | process so that they're globally available configuration options so
     | sensitive configuration information can be swept out of the code.
     |
     */
    (new EnvironmentVariables(app.getEnvironmentVariablesLoader())).load(env);

    /*
     |--------------------------------------------------------------------------
     | Register The Configuration Repository
     |--------------------------------------------------------------------------
     |
     | The configuration repository is used to lazily load in the options for
     | this application from the configuration files. The files are easily
     | separated by their concerns so they do not become really crowded.
     |
     */
    app.config = new Config(
        app.getConfigLoader(), env
    );

    // Set additional configurations
    app.config.set('cache.etagFn', utils.compileETag(app.config.get('cache').etag));
    app.config.set('middleware.queryParserFn', utils.compileQueryParser(app.config.get('middleware').queryParser));
    app.config.set('request.trustProxyFn', utils.compileTrust(app.config.get('request').trustProxy));

    // Expose use method globally
    global.use = app.use.bind(app);

    // Register user aliases for Positron modules
    app.alias(app.config.get('app.aliases', {}));

    /*
     |--------------------------------------------------------------------------
     | Register Booted Start Files & Expose Globals
     |--------------------------------------------------------------------------
     |
     | Once the application has been booted we will expose app globals as per
     | user configuration. Also there are several "start" files
     | we will want to include. We'll register our "booted" handler here
     | so the files are included after the application gets booted up.
     |
     */
    app.booted(function() {
        // expose app globals
        app.exposeGlobals();

        /*
         |--------------------------------------------------------------------------
         | Load The Application Start Script
         |--------------------------------------------------------------------------
         |
         | The start scripts gives this application the opportunity to do things
         | that should be done right after application has booted like configure
         | application logger, load filters etc. We'll load it here.
         |
         */
        var appStartScript = app.path.app + "/start/global.js";


        /*
         |--------------------------------------------------------------------------
         | Load The Environment Start Script
         |--------------------------------------------------------------------------
         |
         | The environment start script is only loaded if it exists for the app
         | environment currently active, which allows some actions to happen
         | in one environment while not in the other, keeping things clean.
         |
         */
        var envStartScript = app.path.app + "/start/" + env + ".js";


        /*
         |--------------------------------------------------------------------------
         | Load The Application Routes
         |--------------------------------------------------------------------------
         |
         | The Application routes are kept separate from the application starting
         | just to keep the file a little cleaner. We'll go ahead and load in
         | all of the routes now and return the application to the callers.
         |
         */
        var routes = app.path.app + "/routes.js";

        async.filter([appStartScript, envStartScript, routes], fs.exists, function (results) {
            results.forEach(function (path) {
                require(path);
            });

            CB(app);
        });
    });

    /*
     |--------------------------------------------------------------------------
     | Register The Core Service Providers
     |--------------------------------------------------------------------------
     |
     | The Positron core service providers register all of the core pieces
     | of the Positron framework including session, auth, encryption
     | and more. It's simply a convenient wrapper for the registration.
     |
     */
    var providers = app.config.get('app').providers;

    app.getProviderRepository().load(providers, function() {

        /*
         |--------------------------------------------------------------------------
         | Boot The Application
         |--------------------------------------------------------------------------
         |
         | Once all service providers are loaded we will  call the boot method on
         | application which will boot all service provider's and eventually boot the
         | positron application.
         |
         */
        app.boot();
    });

}