Skpr provides a compelling command line workflow for developers.
In this blog post we will be demonstrating Skpr by going through the fundamental commands: package, deploy and config.
Package
Modern applications require a set of steps to prepare the application for deployment, these steps might include:
- Installing dependencies eg. Composer
- Building the theme eg. Gulp
- Installing extra packages
The outcome of this preparation then needs to be stored so it can be deployed onto the platform. This process is known as packaging and is accomplished in Skpr by running the command:
skpr package
As you can see in the diagram below, this command does a lot of heavy lifting. It not only compiles your code, it also splits the application into individually scalable components and pushes them to the Skpr platform, ready for deployment.
Also of note, this command can be run by developers and automation alike. Typically this command would be run as part of a pipeline in conjunction with the deploy command for a continuous deployment workflow.
Deploy
Now that our application is packaged, let’s deploy it!
Deploying the application is as simple as running the below command. Seriously, it’s that easy.
skpr deploy
While simple on the surface, Skpr is actually orchestrating a catalog of cloud managed services.
- CDN / Cache
- Certificates
- Database
- Storage
- Search
- SMTP
These services are then exposed to the application through the Skpr’s configuration system.
Config
The Twelve-Factor app manifesto calls for strict separation of configuration from code. This approach provides several advantages:
- Sensitive values such as API tokens and private keys will not be leaked if the codebase was ever exposed.
- There is no need for a switch statement for each environment defining various variables for dev, staging, etc..
- Feature toggles can be used to dynamically enable functionality without a deployment.
Skpr out of the box will provide configuration for:
- Database connection details
- SMTP credentials
- File storage locations eg. public / private / temporary
As a developer you can also add your own custom configuration eg. API keys for an integration.
In this example we are adding an API key for mailchimp and flagging it as a secret to avoid the key from being accidentally exposed (see the [secret] in the command line image above).
skpr config set --secret dev mailchimp.key xxxxxxxxxxxxxxxxxxx
Details on how to configure your application to consume these configuration key/values can be found here.
Conclusion
Skpr provides a simple set of commands for developers to "get the job" done.
If you would like to dive into more of the Skpr commands check out our documentation site, or contact us for a demo via the skpr.io website.