Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing on Helm returns error: ConfigMap.data.SERVICE_ACCOUNT_FULL_PATH missing? #68

Closed
amrlafi opened this issue May 21, 2021 · 7 comments
Assignees

Comments

@amrlafi
Copy link

amrlafi commented May 21, 2021

I'm following this tutorial https://medium.com/diffgram/tutorial-installing-diffgram-on-azure-aks-b9447685e271

I get the following error on running helm install:

Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: unknown object type "nil" in ConfigMap.data.SERVICE_ACCOUNT_FULL_PATH

@PJEstrada
Copy link
Contributor

Hello @amrlafi thanks for using Diffgram!

I will point some things that may be missing here:

Inside the diffgram-helm/values.yaml you should be able to find the value diffgramSettings. DIFFGRAM_STATIC_STORAGE_PROVIDER. This tells Diffgram what cloud storage provided you are using (gcp, azure, aws).

If you have it set to gcp you will need to set the SERVICE_ACCOUNT_FULL_PATH to the path where your GCP service account JSON file is. So the error might be becuase that value is not set.

If you are not using GCP, just change the diffgramSettings. DIFFGRAM_STATIC_STORAGE_PROVIDER to either azure or aws and make sure to provide the credentials values in the values.yaml file.

I think the tutorial fails to explain that, I will make sure to update it to point this out.

@amrlafi
Copy link
Author

amrlafi commented May 22, 2021

Thanks for your suggestion. However, DIFFGRAM_STATIC_STORAGE_PROVIDER is already set to azure

@PJEstrada
Copy link
Contributor

I see,

I think this is an issue where we should have better defaults for the case of this variable: I've created it here: diffgram/diffgram-helm#2

As a workaround, can you please add a dummy path such as:

SERVICE_ACCOUNT_FULL_PATH: /etc/gcp/sa_credentials.json

inside the diffgramSettings in the values.yaml file?

Let me know if this works for you

@amrlafi
Copy link
Author

amrlafi commented May 22, 2021

This did work for the original bug. Now I have another error:

W0522 17:34:44.453339 98592 warnings.go:70] extensions/v1beta1 Ingress is deprecated in v1.14+, unavailable in v1.22+; use networking.k8s.io/v1 Ingress Error: failed pre-install: warning: Hook pre-install diffgram/templates/hooks/secret_gcr_db_migrations.yaml failed: Secret in version "v1" cannot be handled as a Secret: v1.Secret.ObjectMeta: v1.ObjectMeta.TypeMeta: Kind: Data: decode base64: illegal base64 data at input byte 8, error found in #10 byte of ...|gram_team"},"kind":"|..., bigger context ...|":{".dockerconfigjson":"provided_by_diffgram_team"},"kind":"Secret","metadata":{"annotations":{"helm|...

@PJEstrada
Copy link
Contributor

Can you please share with us the values.yaml so we can further debug the issue? Thanks!

@amrlafi
Copy link
Author

amrlafi commented May 22, 2021

# Default values for diffgram.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

# The Diffgram Version. Whenever a new update arrives, this will be changed.
diffgramVersion: latest

# Either 'opencore' or 'enterprise'. Please note that selecting 'enterprise'
# requires that you also set imagePullCredentials.gcrCredentials.
diffgramEdition: opencore

# Set this to your public domain where you want diffgram to be.
diffgramDomain: 52.149.56.29

# Set this to true if you want to use cert manager for TLS certificates generation.
useCertManager: true

dbSettings:
  # Specify How the DB Service should be created
  # - local: use a Postgres Image and Service (No external service) Recommended only for non-production enviroments.
  # - rds: use an ExternalService with an AWS RDS instance. If you set this you need to provide the rdsEndpoint field.
  # - azure: use an ExternalService with an Azure Postgres instance. If you set this you need to provide the azureSqlEndpoint field.
  # - gcsql: use an ExternalService with a Google Cloud SQL instance. If you set this you need to provide the gcSqlEndpoint field.
  dbProvider: azure
  rdsEndpoint: none
  azureSqlEndpoint: diffgram.postgres.database.azure.com
  gcsqlEndpoint: none
  dbUser: dbuser
  dbName: diffgram
  dbPassword: *HIDDEN*
  # For the local postgres DB. Does not have effect on RDS or GCP services.
  storageAmount: 5Gi

# All the Secrets Used in Diffgram.
diffgramSecrets:
  STRIPE_API_KEY: none
  DIFFGRAM_AWS_ACCESS_KEY_ID: none
  DIFFGRAM_AWS_ACCESS_KEY_SECRET: none
  _ANALYTICS_WRITE_KEY: provided_by_diffgram_team
  MAILGUN_KEY: provided_by_diffgram_team
  HUB_SPOT_KEY: provided_by_diffgram_team
  SECRET_KEY: provided_by_diffgram_team
  INTER_SERVICE_SECRET: provided_by_diffgram_team
  # Use diffgram-postgres, postgres-rds-service depending on which DB service you set on dbSettings
  USER_PASSWORDS_SECRET: provided_by_diffgram_team
  # The service account JSON for GCP Static Storage Encoded in Base64.
  SERVICE_ACCOUNT_JSON_B64: put_your_gcp_secret_in_base_64_here
  DIFFGRAM_AZURE_CONNECTION_STRING: DefaultEndpointsProtocol=*HIDDEN*
  
diffgramSettings:
  USERDOMAIN: kubernetes
  DIFFGRAM_SYSTEM_MODE: production
  DIFFGRAM_STATIC_STORAGE_PROVIDER: azure
  DIFFGRAM_S3_BUCKET_NAME: none
  DIFFGRAM_AZURE_CONTAINER_NAME: diffgram
  ML__DIFFGRAM_AZURE_CONTAINER_NAME: diffgram
  ML__DIFFGRAM_S3_BUCKET_NAME: diffgram-testing
  CLOUD_STORAGE_BUCKET: diffgram-testing
  ML__CLOUD_STORAGE_BUCKET: diffgram-testing
  GOOGLE_APPLICATION_CREDENTIALS: /etc/gcp/sa_credentials.json # Check the volume in deployment.yaml and service_account_secret.yaml
  SERVICE_ACCOUNT_FULL_PATH: /etc/gcp/sa_credentials.json
  SERVICE_ACCOUNT: sa_credentials.json

imagePullCredentials:
  # The service account with permissions to pull from the GCR Repository. [Should be Provided by Diffgram Team.]
  gcrCredentials: provided_by_diffgram_team

# The service for API calls.
# This are minimal defaults. Please feel free to change them as you start having more usage
defaultService:
  numReplicas: 1
  requests:
    cpu: "2.0"
    memory: "2G"
  limits:
    cpu: "2.0"
    memory: "2G"
# The service for the UI frontend.
# This are minimal defaults. Please feel free to change them as you start having more usage
frontendService:
  numReplicas: 1
  requests:
    cpu: "1.0"
    memory: "2G"
  limits:
    cpu: "1.0"
    memory: "2G"
# The service for video processing. This is where the heavy processing takes place.
# This are minimal defaults. Please feel free to change them as you start having more usage
walrusService:
  numReplicas: 1
  requests:
    cpu: "16.0"
    memory: "48G"
  limits:
    cpu: "16.0"
    memory: "48G"

@PJEstrada
Copy link
Contributor

Hi @amrlafi

I've manage to solve this bug and released a new helm chart version: https://github.com/diffgram/diffgram-helm/releases/tag/0.1.1

Please make sure to pull the latest helm chart in order to fix this issue

Also related, I've inspected the values.yaml you provided an IP address inside diffgramDomain value. The value here should be a domain name and not an ip addres. If you want to access it via an IP address you will have to check the created ingress IP addres inside you cluster once Diffgram was installed succesfully.

Please also double check that you have the required resources CPU, RAM, DISK in your cluster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants