Overhang.io

Manual migrations step

I can’t get it working out of the box.
So I deployed minio using manifests from the code

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: minio
  labels:
    app.kubernetes.io/name: minio
spec:
  selector:
    matchLabels:
      app.kubernetes.io/name: minio
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app.kubernetes.io/name: minio
    spec:
      containers:
        - name: minio
          image: minio/minio:RELEASE.2019-05-23T00-29-34Z
          args: ["server", "--address", ":9000", "/data"]
          env:
            - name: MINIO_ACCESS_KEY
              value: "openedx"
            - name: MINIO_SECRET_KEY
              value: "uGr0IEAVyA4JHdTy29SpjPVy"
          ports:
            - containerPort: 9000
          volumeMounts:
            - mountPath: /data
              name: data
      volumes:
        - name: data
          persistentVolumeClaim:
            claimName: minio
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: minio-client
  labels:
    app.kubernetes.io/name: minio-client
spec:
  selector:
    matchLabels:
      app.kubernetes.io/name: minio-client
  template:
    metadata:
      labels:
        app.kubernetes.io/name: minio-client
    spec:
      containers:
        - name: minio
          image: minio/mc:RELEASE.2019-05-23T01-33-27Z
          command: ["sh", "-e", "-c"]
          args: ["while true; do echo 'ready'; sleep 10; done"]
---
apiVersion: v1
kind: Service
metadata:
  name: minio
spec:
  type: NodePort
  ports:
    - port: 9000
      protocol: TCP
  selector:
    app.kubernetes.io/name: minio
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: minio
  labels:
    app.kubernetes.io/component: volume
    app.kubernetes.io/name: minio
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 5Gi

Then I ran init part
kubectl exec -it -n openedx minio-client-774b758f9f-tw8rs sh

/ # mc config host add minio http://minio:9000 openedx uGr0IEAVyA4JHdTy29SpjPVy --api s3v4
mc: Configuration written to `/root/.mc/config.json`. Please update your access credentials.
mc: Successfully created `/root/.mc/share`.
mc: Initialized share uploads `/root/.mc/share/uploads.json` file.
mc: Initialized share downloads `/root/.mc/share/downloads.json` file.
Added `minio` successfully.
/ # mc mb --ignore-existing minio/openedx minio/openedxuploads minio/openedxcourseimportexport
Bucket created successfully `minio/openedx`.
Bucket created successfully `minio/openedxuploads`.
Bucket created successfully `minio/openedxcourseimportexport`.

After I ran lms init code
kubectl exec -it lms-6dc48574b5-rk7xn -n openedx bash

root@lms-6dc48574b5-rk7xn:/openedx/edx-platform# dockerize -wait tcp://mysql:3306 -timeout 20s ./manage.py lms --settings=tutor.production migrate
2019/08/14 14:20:31 Waiting for: tcp://mysql:3306
2019/08/14 14:20:31 Connected to tcp://mysql:3306
WARNING:py.warnings:/openedx/edx-platform/lms/djangoapps/courseware/__init__.py:5: DeprecationWarning: Importing 'lms.djangoapps.courseware' as 'courseware' is no longer supported
  warnings.warn("Importing 'lms.djangoapps.courseware' as 'courseware' is no longer supported", DeprecationWarning)

2019-08-14 14:20:35,627 WARNING 347 [enterprise.utils] utils.py:50 - Could not import Registry from third_party_auth.provider
2019-08-14 14:20:35,628 WARNING 347 [enterprise.utils] utils.py:51 - cannot import name _LTI_BACKENDS
System check identified some issues:

WARNINGS:
?: (mysql.W002) MySQL Strict Mode is not set for database connection 'default'
        HINT: MySQL's Strict Mode fixes many data integrity problems in MySQL, such as data truncation upon insertion, by escalating warnings into errors. It is strongly recommended you activate it. See: https://docs.djangoproject.com/en/1.11/ref/databases/#mysql-sql-mode
Operations to perform:
  Apply all migrations: admin, api_admin, assessment, auth, badges, block_structure, bookmarks, branding, bulk_email, catalog, celery_utils, certificates, commerce, completion, consent, content_type_gating, contentserver, contenttypes, cors_csrf, course_action_state, course_duration_limits, course_goals, course_groups, course_modes, course_overviews, courseware, crawlers, credentials, credit, dark_lang, database_fixups, degreed, django_comment_common, django_notify, django_openid_auth, djcelery, edx_oauth2_provider, edx_proctoring, edxval, email_marketing, embargo, enterprise, entitlements, experiments, external_auth, grades, instructor_task, integrated_channel, lms_xblock, microsite_configuration, milestones, mobile_api, notes, oauth2, oauth2_provider, oauth_dispatch, oauth_provider, organizations, programs, redirects, rss_proxy, sap_success_factors, schedules, self_paced, sessions, shoppingcart, site_configuration, sites, social_django, splash, static_replace, status, student, submissions, survey, teams, theming, third_party_auth, track, user_api, user_authn, util, verified_track_content, verify_student, video_config, video_pipeline, waffle, waffle_utils, wiki, workflow, xapi, xblock_django
Running migrations:
  Applying contenttypes.0001_initial... OK
  Applying auth.0001_initial... OK
  Applying admin.0001_initial... OK
  Applying admin.0002_logentry_remove_auto_add... OK
  Applying sites.0001_initial... OK
  Applying contenttypes.0002_remove_content_type_name... OK
  Applying api_admin.0001_initial... OK
  Applying api_admin.0002_auto_20160325_1604... OK
  Applying api_admin.0003_auto_20160404_1618... OK
  Applying api_admin.0004_auto_20160412_1506... OK
  Applying api_admin.0005_auto_20160414_1232... OK
  Applying api_admin.0006_catalog... OK
  Applying api_admin.0007_delete_historical_api_records... OK
  Applying assessment.0001_initial... OK
  Applying assessment.0002_staffworkflow... OK
  Applying assessment.0003_expand_course_id... OK
  Applying auth.0002_alter_permission_name_max_length... OK
  Applying auth.0003_alter_user_email_max_length... OK
  Applying auth.0004_alter_user_username_opts... OK
  Applying auth.0005_alter_user_last_login_null... OK
  Applying auth.0006_require_contenttypes_0002... OK
  Applying auth.0007_alter_validators_add_error_messages... OK
  Applying auth.0008_alter_user_username_max_length... OK
  Applying instructor_task.0001_initial... OK
  Applying certificates.0001_initial... OK
  Applying certificates.0002_data__certificatehtmlviewconfiguration_data... OK
  Applying certificates.0003_data__default_modes...Traceback (most recent call last):
  File "./manage.py", line 123, in <module>
    execute_from_command_line([sys.argv[0]] + django_args)
  File "/openedx/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/openedx/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/openedx/venv/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/openedx/venv/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/openedx/venv/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 204, in handle
    fake_initial=fake_initial,
  File "/openedx/venv/local/lib/python2.7/site-packages/django/db/migrations/executor.py", line 115, in migrate
    state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
  File "/openedx/venv/local/lib/python2.7/site-packages/django/db/migrations/executor.py", line 145, in _migrate_all_forwards
    state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
  File "/openedx/venv/local/lib/python2.7/site-packages/django/db/migrations/executor.py", line 244, in apply_migration
    state = migration.apply(state, schema_editor)
  File "/openedx/venv/local/lib/python2.7/site-packages/django/db/migrations/migration.py", line 126, in apply
    operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
  File "/openedx/venv/local/lib/python2.7/site-packages/django/db/migrations/operations/special.py", line 193, in database_forwards
    self.code(from_state.apps, schema_editor)
  File "/openedx/edx-platform/lms/djangoapps/certificates/migrations/0003_data__default_modes.py", line 24, in forwards
    File(open(settings.PROJECT_ROOT / 'static' / 'images' / 'default-badges' / file_name))
  File "/openedx/venv/local/lib/python2.7/site-packages/django/db/models/fields/files.py", line 94, in save
    self.name = self.storage.save(name, content, max_length=self.field.max_length)
  File "/openedx/venv/local/lib/python2.7/site-packages/django/core/files/storage.py", line 54, in save
    return self._save(name, content)
  File "/openedx/venv/local/lib/python2.7/site-packages/storages/backends/s3boto.py", line 409, in _save
    key = self.bucket.get_key(encoded_name)
  File "/openedx/venv/local/lib/python2.7/site-packages/boto/s3/bucket.py", line 193, in get_key
    key, resp = self._get_key_internal(key_name, headers, query_args_l)
  File "/openedx/venv/local/lib/python2.7/site-packages/boto/s3/bucket.py", line 231, in _get_key_internal
    response.status, response.reason, '')
boto.exception.S3ResponseError: S3ResponseError: 403 Forbidden

What can be wrong? I set same keys (took them from config.yaml)

See my answer: https://github.com/overhangio/tutor/issues/242#issuecomment-521688629
This is an error with the current binary bundle. Please install with pip while we look for a better solution.