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

error: no provider registered with name eks, do you need to add a gem to your Gemfile? #1

Closed
gentlemich opened this issue Oct 9, 2020 · 2 comments

Comments

@gentlemich
Copy link

gentlemich commented Oct 9, 2020

Hi!

When running "bundle exec kuby -e production build" it returns an error saying that "no provider registered with name EKS, do you need to add a gem to your Gemfile?"

gemfile:
gem 'kuby-core' gem 'kuby-eks'

kuby.rb:

require 'active_support/core_ext'
require 'active_support/encrypted_configuration'

Kuby.define('easyllama') do
  app_creds = ActiveSupport::EncryptedConfiguration.new(
    config_path: File.join('config', 'credentials.yml.enc'),
    key_path: File.join('config', 'master.key'),
    env_key: 'RAILS_MASTER_KEY',
    raise_if_missing_key: true
  )

  environment(:production) do
    docker do
      credentials do
        username app_creds[:docker][:user]
        password app_creds[:docker][:password]
        email app_creds[:docker][:email]
      end

      image_url 'app/app'
    end

    kubernetes do
      provider :eks do
        region 'us-east-1'
        cluster_name 'app-prod'

        credentials(
          Aws::Credentials.new(
            app_creds[:aws][:access_key],
            app_creds[:aws][:secret_key]
          )
        )
      end

      add_plugin :rails_app do
        hostname 'app.com'

        database do
          user 'db'
          password app_creds[:db][:password]
        end
      end
    end
  end
end

@camertron
Copy link
Member

Hey @gentlemich, can you try adding require 'kuby/eks' to the top of your kuby.rb?

@gentlemich
Copy link
Author

Thanks @camertron , it works!

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