예제 #1
0
    def _first_time_use_instructions(self):
        """Instructions for configuring Spinnaker for the first time.

    Google Cloud Platform is treated as a special case because some
    configuration parameters have defaults implied by the runtime environment.
    """
        optional_defaults_if_on_google = ""

        if is_google_instance():
            google_project = get_google_project()
            optional_defaults_if_on_google = """    #   NOTE: Since you deployed on GCE:
    #      * You do not need JSON credentials to manage project id "{google_project}".
""".format(
                google_project=google_project
            )

        return """
    {sudo}mkdir -p {config_dir}
    {sudo}cp {install_dir}/default-spinnaker-local.yml \\
       {config_dir}/spinnaker-local.yml
    {sudo}chmod 600 {config_dir}/spinnaker-local.yml

    # edit {config_dir}/spinnaker-local.yml to your liking:
    #   If you want to deploy to Amazon Web Services:
    #      * Set providers.aws.enabled = true.
    #      * Add your keys to providers.aws.primaryCredentials
    #        or write them to $HOME/.aws/credentials
    #
    #   If you want to deploy to Google Cloud Platform:
    #      * Set providers.google.enabled = true.
    #      * Add your project_id to providers.google.primaryCredentials.project
    #      * Add your the path to your json service account credentials to
    #        providers.google.primaryCredentials.jsonPath.
{optional_defaults_if_on_google}
    {sudo}{script_dir}/stop_spinnaker.sh
    {sudo}{script_dir}/reconfigure_spinnaker.sh
    {sudo}{script_dir}/start_spinnaker.sh
""".format(
            sudo="" if os.geteuid() else "sudo ",
            install_dir=self.__configurator.installation_config_dir,
            config_dir=self.__configurator.user_config_dir,
            script_dir=self.__installation.UTILITY_SCRIPT_DIR,
            optional_defaults_if_on_google=optional_defaults_if_on_google,
        )
예제 #2
0
  def _first_time_use_instructions(self):
    """Instructions for configuring Spinnaker for the first time.

    Google Cloud Platform is treated as a special case because some
    configuration parameters have defaults implied by the runtime environment.
    """
    optional_defaults_if_on_google = ''

    if is_google_instance():
      google_project = get_google_project()
      optional_defaults_if_on_google = """    #   NOTE: Since you deployed on GCE:
    #      * You do not need JSON credentials to manage project id "{google_project}".
""".format(google_project=google_project)

    return """
    {sudo}mkdir -p {config_dir}
    {sudo}cp {install_dir}/default-spinnaker-local.yml \\
       {config_dir}/spinnaker-local.yml
    {sudo}chmod 600 {config_dir}/spinnaker-local.yml

    # edit {config_dir}/spinnaker-local.yml to your liking:
    #   If you want to deploy to Amazon Web Services:
    #      * Set providers.aws.enabled = true.
    #      * Add your keys to providers.aws.primaryCredentials
    #        or write them to $HOME/.aws/credentials
    #
    #   If you want to deploy to Google Cloud Platform:
    #      * Set providers.google.enabled = true.
    #      * Add your project_id to providers.google.primaryCredentials.project
    #      * Add your the path to your json service account credentials to
    #        providers.google.primaryCredentials.jsonPath.
{optional_defaults_if_on_google}
    {sudo}{script_dir}/stop_spinnaker.sh
    {sudo}{script_dir}/reconfigure_spinnaker.sh
    {sudo}{script_dir}/start_spinnaker.sh
""".format(
  sudo='' if os.geteuid() else 'sudo ',
  install_dir=self.__configurator.installation_config_dir,
  config_dir=self.__configurator.user_config_dir,
  script_dir=self.__installation.UTILITY_SCRIPT_DIR,
  optional_defaults_if_on_google=optional_defaults_if_on_google)