Part 3 Of A Series
This is part 3 of a guide that walks through creating a sample application in Replicated Ship. If you haven’t followed the previous sections of this guide, go back to deploying an application before following this guide.
Now that we’ve created a customer and a release, we can produce an installation script for our test customer.
In the modal, you’ll want to navigate to “Ship OSS”.
This guide assumes you’ll run Ship with Homebrew using
brew install ship, or downloading the binary, but you can also run Ship with the
replicated/ship docker container.
Copy the command from this screen, we’ll run it in the next step. When your end customer installs your application, you’ll give them this command to run on their workstation.
Run the command from the modal. It should look something like:
ship init "replicated.app/superci-enterprise?license_id=MoYBbdP4sy6qomD9WdAWjAsWPsKF3YZ1"
This command will read the release we created in https://vendor.replicated.com and then prompt us to open a browser:
Reading replicated.app/superci-enterprise?license_id=MoYBbdP4sy6qomD9WdAWjAsWPsKF3YZ1 ... Determining application type ... Detected application type replicated.app Please visit the following URL in your browser to continue the installation http://localhost:8800
From here, you’ll work through the
lifecycle we defined previously, until you get to the “You’re all done” page:
Once you reach the end of the workflow, the
ship init CLI command will exit, and you can review the files creeated:
$ find . . ./.ship ./.ship/state.json ./installer ./installer/k8s ./installer/k8s/nginx-service.yaml ./installer/k8s/nginx-deployment.yaml
inline assets from above have been created under the
installer directory. There’s also a
.ship/state.json which holds metadata about the installation. We’ll use this state file later in the Shipping an Update chapter of this guide.
Executing this installer script generated everything that’s needed to deploy our application to a Kubernetes cluster. But we need to bring a Kubernetes cluster, and should already have
kubectl set up and configured to continue with the next steps.
As instructed in the lifeycle, we can
kubectl apply -f installer/k8s
and we’re off to the races. If you’re on Docker for Desktop, the
LoadBalancer service should get your nginx listening on port
80 on localhost. If you’re on a cloud-provided cluster, you’ll need to inspect
kubectl get svc to find the load balancer IP.
Now that we’ve shipped our first release, its time to work through Shipping an Update.