Bootstrapping Apcera CE

This section describes the bootstrapping process for importing packages and creating service providers for the Apcera Platform Community Edition.

Bootstrap command

You can use the apcera-setup bootstrap command to import a base set of packages and create service providers for NFS, MySQL, and PostgreSQL.

For example, on Mac you run the command $ ./apcera-setup bootstrap.

Note that it will take about 30 minutes to complete the bootstrap process, possibly longer depending on your network speed.

Bootstrap process

You must bootstrap your cluster on initial deploy. The bootstrap process imports a base set of packages, including Ubuntu, Go, Java, Node, Ruby, and many more. In addition, bootstrapping registers service providers for NFS, MySQL, and PostgreSQL that your apps can bind to.

If you are only running Docker images or capsules and don't require database services out-of-the-box (not common), you may only need to import the Ubuntu OS packages. After running the bootstrap command you can delete the packages from the /apcera/pkg/packages and /apcera/pkg/runtimes namespaces, leaving the Ubuntu OS package located in the /apcera/pkg/os namespace.

Package import

The apcera-setup bootstrap command downloads to your working directory the file apcera_packages_deploy.zip which is approximately 1.3GB in size and contains a base set of packages. The ZIP file is extracted and each package (*.cntmp file) is imported into your cluster.

If a package fails to import, run the bootstrap process again. Existing packages will be skipped, and any missing packages should be uploaded. See troubleshooting to manually import package files.

Once the base set of packages are installed, you can view them in the web console, or using apc package list -ns /.

screenshot

$ apc package list -ns /
Working in "/"
╭────────────────────────────────────────────────────────┬──────────────────────┬───────╮
│ Name                                                   │ Namespace            │ State │
├────────────────────────────────────────────────────────┼──────────────────────┼───────┤
│ ubuntu-14.04-apc3                                      │ /apcera/pkg/os       │ ready │
│ ubuntu-14.04-build-essential-apc3                      │ /apcera/pkg/os       │ ready │
│ apache-2.2.29                                          │ /apcera/pkg/packages │ ready │
│ apache-ant-1.9.4                                       │ /apcera/pkg/packages │ ready │
│ apache-tomcat-8.0.30                                   │ /apcera/pkg/packages │ ready │
│ bzr-2.6.0                                              │ /apcera/pkg/packages │ ready │
│ git-2.3.1                                              │ /apcera/pkg/packages │ ready │
│ gnatsd-0.7.2                                           │ /apcera/pkg/packages │ ready │
│ imagemagick-6.8.9-6-apc2                               │ /apcera/pkg/packages │ ready │
│ iperf-2.0.5                                            │ /apcera/pkg/packages │ ready │
│ maven-3.2.2                                            │ /apcera/pkg/packages │ ready │
│ memcached-1.4.20                                       │ /apcera/pkg/packages │ ready │
│ mercurial-3.0.2                                        │ /apcera/pkg/packages │ ready │
│ mysql-5.6.25-apc2                                      │ /apcera/pkg/packages │ ready │
│ newrelic-java-3.20.0                                   │ /apcera/pkg/packages │ ready │
│ nginx-1.6.0-apc1                                       │ /apcera/pkg/packages │ ready │
│ postgres-9.4.4-apc1                                    │ /apcera/pkg/packages │ ready │
│ rabbitmq-3.5.5                                         │ /apcera/pkg/packages │ ready │
│ redis-2.8.17                                           │ /apcera/pkg/packages │ ready │
│ rsync-3.1.1                                            │ /apcera/pkg/packages │ ready │
│ subversion-1.8.9                                       │ /apcera/pkg/packages │ ready │
│ td-agent-1.1.17-amd64                                  │ /apcera/pkg/packages │ ready │
│ tokumx-2.0.1                                           │ /apcera/pkg/packages │ ready │
│ zsh-5.0.5                                              │ /apcera/pkg/packages │ ready │
│ clisp-2.49                                             │ /apcera/pkg/runtimes │ ready │
│ erlang-R16B03                                          │ /apcera/pkg/runtimes │ ready │
│ go-1.5.1                                               │ /apcera/pkg/runtimes │ ready │
│ node-4.2.1                                             │ /apcera/pkg/runtimes │ ready │
│ openjdk-1.6                                            │ /apcera/pkg/runtimes │ ready │
│ openjdk-1.7                                            │ /apcera/pkg/runtimes │ ready │
│ perl-5.20.0                                            │ /apcera/pkg/runtimes │ ready │
│ php-5.4.31-apc3                                        │ /apcera/pkg/runtimes │ ready │
│ php-apache-5.6.16                                      │ /apcera/pkg/runtimes │ ready │
│ php-fpm-nginx-5.6.16                                   │ /apcera/pkg/runtimes │ ready │
│ python-2.7.8                                           │ /apcera/pkg/runtimes │ ready │
│ python-3.4.3                                           │ /apcera/pkg/runtimes │ ready │
│ ruby-2.2.3                                             │ /apcera/pkg/runtimes │ ready │
╰────────────────────────────────────────────────────────┴──────────────────────┴───────╯

Service provider creation

The apcera-setup bootstrap command targets your cluster and registers service providers for NFS, MySQL, and PostgreSQL. You can register any other supported service provider that you require. See the services documentation for guidance.

In terms of service creation, the Apcera CE bootstrapping process does the following:

  • Registers a singleton APCFS server with the system as a NFS persistence provider using the nfs service gateway
  • Imports the MySQL and PostgreSQL database packages into the cluster
  • Runs app from package to create the MySQL and PostgreSQL database apps
  • Creates a service and binding to the NFS provider for each database app
  • Registers each database app as a provider using the corresponding service gateway (mysql and postgres)

This setup allows you to use the MySQL and PostgreSQL providers out-of-the-box to easily create database services that are backed by an NFS persistence layer. In addition, each service binding connection is brokered by a semantic pipeline with ephemeral credentials. See the Walkthrough to get started using MySQL and Postgres services.

Once these providers are registered, you can view them in the web console, or using apc provider list -ns /.

screenshot

$ apc provider list -ns /
Working in "/"
╭───────────────────┬──────────┬───────────────────┬─────────────╮
│ Name              │ Type     │ Namespace         │ Description │
├───────────────────┼──────────┼───────────────────┼─────────────┤
│ apcfs             │ nfs      │ /apcera/providers │ NFSv4       │
│ mysql-provider    │ mysql    │ /apcera/providers │             │
│ postgres-provider │ postgres │ /apcera/providers │             │
╰───────────────────┴──────────┴───────────────────┴─────────────╯