If the contents of your `~/.kube/config` file are passed as the instance
metadata parameter `kube_config`, and you do not specify the GKE cluster you
wish to manage with `kube_cluster`, that file's contents will be used as the
credentials to manage your kubernetes cluster with Spinnaker.
default-spinnaker-local added a number of environment variables for provider configuration.
These are set in /etc/default/spinnaker. When we dont use a spinnaker-local, these dont get
picked up (from spinnaker.yml) so are ignored. Here we introduce the default environment
variable bindings in the spinnaker.yml itself.
Some additional variables are added that first_google_boot writes out.
If the user now provides "gcr_enabled" as instance metadata, but does not
supply an email address, the default compute service account is used.
Also the user can optionally provide which GCR registry to use.
postInstall is running in bourne shell, with built-in echo that doesnt support -e.
This was causing the config files to be malformed (containing -e) and preventing spinnaker
from running via upstart.
Also make first_google_boot resilient for configuring in the case when spinnaker could not start.
When omitting cassandra, it will still add the package manager location
but will not actually install it. I can remove that too, but figured I'd
wait until we completely remove cassandra. In the meantime adding the location
will make it easier to manually install cassandra later should the deployer change
their mind.
The default behavior for GCP is to leave out cassandra. The other platforms are unchanged
for the time being. Adding a --noinstall_cassandra will force it off and --install_cassandra
will force it on.
Removed explicit cassandra (and redis) management entirely from developer mode (running from source).
To use cassandra from source, you'll need to ensure it is running yourself.
If it is an upstart service (as is normal) then it will already be running anyway.
I left the stop scripts in for now because I'm not sure if anyone is using the stop dependencies
script, but expect to remove this as well.
All typos except the following one are in comments.
```
- primaryAccountName: service-default-primaryAcountName-not-defined
+ primaryAccountName: service-default-primaryAccountName-not-defined
```
It's a just sample value of config file.
We perform a dist-upgrade in the boot for security reasons. This could take several minutes,
especially as the image grows stale and security patches grow. Before the upgrade occurred
at the beginning of the script meaning the guts of the script block on the upgrade completing.
Since spinnaker images typically auto upstart spinnaker on boot, that means that Spinnaker
is running during the upgrade but has not yet been configured as the VM was directed.
This CL moves the security upgrade to the end of the script so that the configuration
is properly in place.
One could argue that we should not run Spinnaker at all until the upgrade has finished.
Since it was already running, I'm not changing that policy. Also, this script is an
explicit choice passed into the VM so is not actually forced as a condition for using
spinnaker. It is used by C2D (and other adhoc VM creation techniques), which is
user-interactive introduction so I'd argue a timely boot is more important.
Otherwise, the "start spinnaker" call should be moved to the very end of the script.
I added a control parameter to allow this change, though would be happy to remove it
in favor of requiring either one of the policies.
Another speedup here is that I remove old kernels from the image we are building.
This is another "not sure if I should" decision, but think it makes sense. The
source images seem to include two kernels on them. It is standard practice to have
two kernels so that there is a fallback in case the upgrade fails. However since we
are baking and testing these images, and they are going to boot as is, I dont expect
anyone to ever boot off the older image and if there is a problem with the kernel, then
we should pick that up before releasing the image. The dist-upgrade seems to be doing
work for each of the kernels, so removing the old kernel knocks at least 45 seconds off
startup for the rebuild step, plus whatever other download and update work was needed
prior to that.
Finally, I noticed that the packer source image was old so I updated it. This might have
been adding additional time from being a further out delta to upgrade from. I changed the
wrapper script to inject the current version as the source image so things should generally
stay up to date when following standard processes using the provided scripts.
Unfortunately packer is based on JSON and JSON does not support comments so I couldnt
what's going on in the packer script. I added a crude comment to the best of packer's
commenting support.
s/SPINNAKER_GOOGLE_PROJECT_DEFAULT_REGION/SPINNAKER_GOOGLE_DEFAULT_REGION
s/SPINNAKER_GOOGLE_PROJECT_DEFAULT_ZONE/SPINNAKER_GOOGLE_DEFAULT_ZONE
Hardcode profile name in generated ~/.aws/credentials to [default].
Restart all of spinnaker after updating cassandra and reconfiguring spinnaker, instead of just restarting clouddriver.