Giter Club home page Giter Club logo

installing-pcf-in-aws's Introduction

Installing-PCF-in-AWS

Guide detailing how to install a PCF instance on top of a raw account of AWS NOTE: A more detailed, and more granular installation process can be found in the official documentation.

  1. Base installation with cfawsinit
  2. Installing AWS services broker
  3. Installing ELK tile for log gathering and querying
  4. Installing PCF Metrics for monitoring individual apps

Preparing AWS

At this point it is assumed an AWS account is ready to be used.

Before getting started, setting up Cloud Trail will allow us to monitor API calls, it is useful to enable Cloud Trail before proceeding any further.

An IAM user for pcf needs to be created, this will provide us with the access key and secret access key. Additionally, we will need to generate a key pair in EC2. Since the user is going to perform cloudformation, it is easier to run the process with admin privileges.

Verify that EC2 instance limit is sufficient. The default is 20 instances which is barely enough to run minimal PCF across 3 availability zones (AZ).

Setting up the main domain

Before getting started it is important to get a domain with a valid certificate. Self-signed certificates, although feasible, will cause issues at different points, so it is strongly recommended to get a valid certificate.

In this documentation we assume that the domain is obtained from AWS Route53 and the certificate is registered in AWS Certificate Manager.

Registering the certificate

Once the domain is ready, it is important to register several domains and subdomains that will be required further during the installation process. Assuming your domain is example.com you should register:

  • *.login.system.example.com
  • *.uaa.system.example.com
  • *.system.example.com
  • *.apps.example.com

Further details can be found in the official documentation

It is useful to make note of the certificate identifier since it will be required in the next step (it can alternatively be read from the Certificate Manager at any time).

Executing CloudFormation (using cfawsinit)

In order to set up PCF, the first step is to make sure the AWS infrastructure is ready, for this task we will use AWS cloudformation and we will run the provided cloudformation template together with further installation steps in an automatic way using cfawsinit.

To get cfawsinit ready to get started, we need to provide it with a yaml file specifying the connection parameters among others, in particular:

region: aws region (e.g. eu-west-1)
email: a reference email address (e.g. [email protected])
ssh_private_key_path: the path to the private key that was set up in EC2 (e.g. ~/keys/mynewkey.pem)
ssh_key_name: the name of the above key as specified in EC2 (e.g. my-key)
domain: domain of the platform (e.g. example.com)
ssl_cert_arn: an ID of a certificate created with CM (e.g. 	arn:aws:acm:eu-east-1:6333456:certificate/333-9447-4751-ae11-cd555d)
PIVNET_TOKEN: token from network.pivotal.io (can be seen https://network.pivotal.io/users/dashboard/edit-profile e.g. AAAA-h6BBBBBCotwXFi)
ops-manager:
    version: latest
    beta-ok: false
elastic-runtime:
    version: latest
    beta-ok: false
    cloudformation-template: pcf_1_7_cloudformation_singlefile.json
skip_cert_verify: true

A template is provided for your convenience.

cfawsinit will proceed with the cloudformation procedure in first instance and will install and configure Ops Manager afterwards. No tiles will be set up with the current version.

As explained in Installation Docs it is necessary to point a DNS domain, ideally a wildcard domain, at the load balancer. On AWS, the name/IP address of the load balancer is unknown until it is created. Therefore only after the cloudformation script created ELB you can log in to Route53 and point *.domain to your ELB using a CNAME record as described here.

Note that the instance hosting Ops Manager has very generous permissions (e.g. IAM) and it is publicly available on the internet by default. In order to mitigate the risks you might enclose it in a private subnet or secure it by other means.

Troubleshooting

  • Errors while running smoke tests/errands: tests are run from a virtual machine created in the private network. They involve communication with PCF API via the cf CLI. Make sure that the ELB is available from the private subnet (this may require to temporarily attach a NAT gateway to the private subnet). NOTE: The cloudformation script does this on purpose so you can decide how to enable that connectivity.

Installing AWS services broker

Follow the official documentation. Please keep in mind the official documentation requires a user with, among others, IAM permission. This permission is used to create new users and attach policies to it. That happens as part of service instantiation for some components such as dynamoDB.

Installing PCF Metrics

Follow the official documentation.

Installing ELK tile

Follow the official documentation. Once your ELK is ready, you might want to configure your ERT and orther tiles to ship logs to logstash as described in the previous link, you might want to ship application logs into logstash as described in this documentation page

installing-pcf-in-aws's People

Contributors

calamarbicefalo avatar mkuratczyk avatar

Watchers

James Cloos 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.