Skip to content

chore: add differ infrastructure config - #44

Closed
arealmaas wants to merge 5 commits into
labsai:masterfrom
EdtechFoundry:chore--add-differ-infrastrcture-config
Closed

chore: add differ infrastructure config#44
arealmaas wants to merge 5 commits into
labsai:masterfrom
EdtechFoundry:chore--add-differ-infrastrcture-config

Conversation

@arealmaas

@arealmaas arealmaas commented Jul 24, 2017

Copy link
Copy Markdown
Contributor

This change is Reviewable

ginccc and others added 2 commits July 17, 2017 15:31
@arealmaas

Copy link
Copy Markdown
Contributor Author

Review status: 0 of 10 files reviewed at latest revision, 10 unresolved discussions.


.circleci/config.differ.yml, line 1 at r2 (raw file):

version: 2

just named the file config.differ.yml. Just wanna make sure the config seems correct


.circleci/config.differ.yml, line 10 at r2 (raw file):

      - image: labsai/ci-build
      - environment:
          ACCT_AUTH: ${ACCT_AUTH}

token for a Google Cloud service account that has access to Google Cloud Registries to be able to push images


.circleci/config.differ.yml, line 26 at r2 (raw file):

            - /root/.m2

      - run: ./tools/ensure-gcloud-installed.sh

we need google cloud sdk installed. Could have used google/cloud-sdk as a base image instead, but I see that you use labsai/ci-build already


.circleci/config.differ.yml, line 28 at r2 (raw file):

      - run: ./tools/ensure-gcloud-installed.sh

      - run: ./tools/ensure-helm-installed.sh

needed to install our package manager for kubernetes


.circleci/config.differ.yml, line 55 at r2 (raw file):

            export version=4.0.1

            sudo /opt/google-cloud-sdk/bin/gcloud docker build -t $DOCKER_IMAGE:$version-$CIRCLE_BUILD_NUM .

Have to use the docker executable that comes with gcloud


.circleci/config.differ.yml, line 61 at r2 (raw file):

            sudo /opt/google-cloud-sdk/bin/gcloud docker push $DOCKER_IMAGE:latest

            sudo helm upgrade $APP_NAME charts/$APP_NAME --set image.tag=$version-$IMAGE_TAG --install

This means that the service should be upgraded with the new image version using the configuration specified in charts/eddi. Uses the development-configuration by default.
--install is for when the service does not exist and needs to be installed


charts/eddi/requirements.yaml, line 3 at r2 (raw file):

dependencies:
  - name: mongodb
    version: 4.0.0

this is not the mongodb version, but the version of our mongodb helm chart


charts/eddi/values.production.yaml, line 8 at r2 (raw file):

    value: 'differ-140008'
  - name: MONGODB_HOST
    value: 'mongodb://eddi-storage-0.eddi-storage'

Since we're using stateful-sets this is what the connection string looks like: .


charts/eddi/values.production.yaml, line 21 at r2 (raw file):

  resources:
    requests:
      memory: 256Mi

requested resource in kubernetes for mongodb. Can be increased as we move on


charts/eddi/values.yaml, line 13 at r2 (raw file):

  limits:
    cpu: 100m
    # nodejs heap limit

Not sure what this is for java? from Google:

"The maximum heap size is typically -Xmx3800m (1600m) for 2 GB limits), though the actual limitation is application dependent. For 64-bit process models, the maximum is essentially unlimited."

the pod will be killed if it exceeds this limit. Might make it infinite but add an alert for memory levels instead. What you think @gregor?


Comments from Reviewable

@ginccc ginccc closed this Jul 24, 2017
ginccc added a commit that referenced this pull request Jul 3, 2026
…s, scale poller, add pause retention

Findings 5, 7, 17, 26, 32, 44:

- #5 (security): RestScheduleStore refuses manual fire of HITL timeout
  schedules (409 for everyone, incl. admins), requires eddi-admin to
  mutate/disable/delete them (403), and redacts them from non-admins.
  PostgresScheduleStore gains a metadata JSONB column (parity with Mongo's
  full-doc persistence) so the HITL fast-path and the guard work on both
  backends.
- #7: AgentDeploymentManagement idle sweep skips AWAITING_HUMAN instead of
  force-ENDing them via a raw non-CAS write; logs spared count.
- #17: configurable poll batch size (both stores) + concurrent virtual-thread
  dispatch of claimed schedules with per-fire error isolation; CAS claim stays
  before dispatch.
- #26/#44: RestConversationStore routes paused end/permanent-delete through the
  HITL-aware IConversationService.endConversation.
- #32: optional pause-retention sweep (eddi.hitl.pending.max-age, default OFF)
  in HitlCrashRecoveryObserver via cancelConversation; reuses scheduling infra.
- CodeQL: silence unused @observes StartupEvent param (required CDI trigger).

Pure JUnit/Mockito tests added for each. Compile + test-compile green.
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

Successfully merging this pull request may close these issues.

2 participants