amazon-web-servicesslackspinnakerhal

! ERROR No persistent storage type was configured. - Failed to deploy Spinnaker


I have a problem, when I want to update the spinnaker, or set the slack notification, when I run the hal deploy apply command, I get ! ERROR No persistent storage type was configured.- Failed to deploy Spinnaker.

root@HP:~# hal config notification slack enable
+ Get current deployment
  Success
+ Edit slack settings
  Success
+ Successfully enabled slack
root@HP:~# hal config notification slack edit --bot-name spinnaker --token *******48UWQ
+ Get current deployment
  Success
+ Get slack notification
  Success
+ Edit the slack notification
  Success
+ Edited slack.
root@HP:~# hal deploy apply
+ Get current deployment
  Success
+ Prep deployment
  Success
Validation in default.stats:
- INFO Stats are currently ENABLED. Usage statistics are being
  collected. Thank you! These stats inform improvements to the product, and that
  helps the community. To disable, run `hal config stats disable`. To learn more
  about what and how stats data is used, please see
  https://www.spinnaker.io/community/stats.

+ Preparation complete... deploying Spinnaker
+ Get current deployment
  Success
- Apply deployment
  Failure
Validation in Global:
! ERROR No persistent storage type was configured.

- Failed to deploy Spinnaker.

UPDATE. This is most likely all a S3 error, he needs persistent storage to indicate, but when I follow the official documentation, another error appears

user@HP:~/.aws$ hal config storage s3 edit
+ Get current deployment
  Success
+ Get persistent store
  Success
Generated bucket name: spin-*****-*****-*****-*****
- Edit persistent store
  Failure
Validation in default.persistentStorage:
- WARNING Your deployment will most likely fail until you configure
  and enable a persistent store.

Validation in default.persistentStorage.s3:
! ERROR Failed to ensure the required bucket
  "spin-*****-*****-*****-*****" exists: Unable to load AWS
  credentials from any provider in the chain:
  [EnvironmentVariableCredentialsProvider: Unable to load AWS credentials from
  environment variables (AWS_ACCESS_KEY_ID (or AWS_ACCESS_KEY) and AWS_SECRET_KEY
  (or AWS_SECRET_ACCESS_KEY)), SystemPropertiesCredentialsProvider: Unable to load
  AWS credentials from Java system properties (aws.accessKeyId and aws.secretKey),
  WebIdentityTokenCredentialsProvider: You must specify a value for roleArn and
  roleSessionName, com.amazonaws.auth.profile.ProfileCredentialsProvider@1239df9e:
  No AWS profile named 'default',
  com.amazonaws.auth.EC2ContainerCredentialsProviderWrapper@5139efc8: Failed to
  connect to service endpoint: ]

- Failed to edit persistent store "s3".

Solution

  • Remember the recommended way to install Spinnaker is in a Kubernetes cluster. Unless you use Minnaker project that can safely run in any Compute instance such as EC2 ubuntu 18.04

    For your case make sure your AWS Account has the permissions over AWS S3. If you are using halyard from a container, Instance or Kubernetes Pod make sure that you use an AWS IAM user or Role with the required permissions to AWS S3. Refer to the Spinnaker docs for editing Storage(https://spinnaker.io/setup/install/storage/s3/#editing-your-storage-settings)

    The full command if you had previously created an AWS IAM user with the right AWS IAM policies should be

    hal config storage s3 edit \
    --access-key-id $YOUR_ACCESS_KEY_ID \
    --secret-access-key \
    --region $REGION
    

    Remember to Join Spinnaker in the Slack Community for further questions