├── .build-jdk8 ├── .blazar-enabled ├── scripts ├── logfetch │ ├── __init__.py │ ├── errors.py │ ├── .logfetch.example │ ├── fake_section_head.py │ └── cat.py ├── setup.cfg ├── .blazar.yaml ├── LICENSE.txt └── setup.py ├── SingularityExecutor ├── .build-executable ├── src │ ├── main │ │ ├── docker │ │ │ ├── config │ │ │ │ ├── singularity.s3base.yaml │ │ │ │ ├── singularity.base.yaml │ │ │ │ └── singularity.executor.yaml │ │ │ └── executable │ │ │ │ └── singularity-executor │ │ ├── resources │ │ │ ├── logrotate.cron.hbs │ │ │ └── deploy.env.hbs │ │ └── java │ │ │ └── com │ │ │ └── hubspot │ │ │ └── singularity │ │ │ └── executor │ │ │ ├── models │ │ │ └── ThreadCheckerType.java │ │ │ ├── task │ │ │ └── TaskCleanupResult.java │ │ │ ├── handlebars │ │ │ ├── IfHasNewLinesOrBackticksHelper.java │ │ │ ├── IfPresentHelper.java │ │ │ ├── ShellQuoteHelper.java │ │ │ ├── BashEscapedHelper.java │ │ │ └── EscapeNewLinesAndQuotesHelper.java │ │ │ └── shells │ │ │ └── SingularityExecutorShellCommandOptionDescriptor.java │ └── test │ │ └── resources │ │ └── config │ │ ├── executor-conf-dockerauth-fromconfig.yaml │ │ └── executor-conf-dockerauth.yaml └── .blazar.yaml ├── SingularityService ├── .build-executable ├── src │ ├── test │ │ ├── resources │ │ │ └── configs │ │ │ │ ├── just_a_string.yaml │ │ │ │ ├── override.yaml │ │ │ │ └── default.yaml │ │ └── java │ │ │ └── com │ │ │ └── hubspot │ │ │ └── singularity │ │ │ ├── SingularityTestBaseNoDb.java │ │ │ └── SingularityTestAuthenticator.java │ └── main │ │ ├── java │ │ └── com │ │ │ └── hubspot │ │ │ └── singularity │ │ │ ├── hooks │ │ │ ├── WebhookQueueType.java │ │ │ ├── AbstractWebhookChecker.java │ │ │ ├── SingularityRequestWebhookAsyncHandler.java │ │ │ ├── SingularityDeployWebhookAsyncHandler.java │ │ │ ├── SingularityTaskWebhookAsyncHandler.java │ │ │ └── SingularityWebhookPoller.java │ │ │ ├── mesos │ │ │ ├── EventBufferOverflowException.java │ │ │ └── OfferCache.java │ │ │ ├── config │ │ │ ├── SingularityConfigurationMergeException.java │ │ │ ├── NetworkConfiguration.java │ │ │ ├── UIQuickLinkConfiguration.java │ │ │ ├── SentryConfiguration.java │ │ │ ├── WebhookAuthConfiguration.java │ │ │ └── shell │ │ │ │ └── ShellCommandOptionDescriptor.java │ │ │ ├── data │ │ │ ├── transcoders │ │ │ │ ├── Transcoder.java │ │ │ │ ├── StringTranscoder.java │ │ │ │ ├── SingularityTranscoderException.java │ │ │ │ └── EnumTranscoder.java │ │ │ ├── zkmigrations │ │ │ │ ├── TaskManagerRequiredParentsForTransactionsMigration.java │ │ │ │ ├── ClearUsagesMigration.java │ │ │ │ ├── SlaveAndRackMigration.java │ │ │ │ └── SlaveAndRackMigration2.java │ │ │ ├── usage │ │ │ │ └── TaskUsageManager.java │ │ │ └── ZkWebhookQueue.java │ │ │ ├── auth │ │ │ ├── datastore │ │ │ │ ├── SingularityAuthDatastore.java │ │ │ │ ├── SingularityDisabledAuthDatastore.java │ │ │ │ └── SingularityDummyDatastore.java │ │ │ ├── authenticator │ │ │ │ ├── SingularityAuthenticator.java │ │ │ │ └── SingularityDisabledAuthenticator.java │ │ │ ├── SingularityAuthParamInjectionResolver.java │ │ │ └── SingularityAuthDatastoreClass.java │ │ │ ├── SingularityAsyncHttpClient.java │ │ │ ├── event │ │ │ ├── SingularityEventSender.java │ │ │ └── SingularityEventListener.java │ │ │ ├── smtp │ │ │ ├── SMTPAuthenticator.java │ │ │ ├── SingularityMailTaskHistoryUpdate.java │ │ │ ├── JadeTemplateLoader.java │ │ │ └── SingularityMailTaskLog.java │ │ │ ├── jersey │ │ │ ├── SingularityJerseyModule.java │ │ │ └── JerseyBinder.java │ │ │ ├── helpers │ │ │ ├── SingularityMesosTaskHolder.java │ │ │ ├── SingularityRequestDeployHolder.java │ │ │ └── SingularityS3Service.java │ │ │ ├── guice │ │ │ ├── DropwizardMetricRegistryProvider.java │ │ │ └── DropwizardObjectMapperProvider.java │ │ │ ├── sentry │ │ │ ├── NotifyingUncaughtExceptionManager.java │ │ │ ├── NotifyingExceptionMapper.java │ │ │ └── SingularityExceptionNotifierManaged.java │ │ │ ├── ServerProvider.java │ │ │ ├── scheduler │ │ │ ├── SingularityCooldownPoller.java │ │ │ ├── TaskIdWithUsage.java │ │ │ └── SingularityUsageCleanerPoller.java │ │ │ ├── SingularityOkHttpClient.java │ │ │ └── metrics │ │ │ ├── SingularityMetricsContainer.java │ │ │ └── GraphiteWithTags.java │ │ └── docker │ │ └── singularity.yaml └── .blazar.yaml ├── SingularityUI ├── app │ ├── actions │ │ ├── ui │ │ │ ├── tail.es6 │ │ │ ├── webhooks.es6 │ │ │ ├── title.es6 │ │ │ ├── groupDetail.es6 │ │ │ ├── status.es6 │ │ │ ├── taskSearch.es6 │ │ │ ├── tasks.es6 │ │ │ ├── disasters.es6 │ │ │ ├── form.es6 │ │ │ ├── racks.es6 │ │ │ ├── globalSearch.es6 │ │ │ ├── newDeployForm.es6 │ │ │ ├── requestForm.es6 │ │ │ ├── requests.es6 │ │ │ └── requestDetail.es6 │ │ ├── api │ │ │ ├── auth.es6 │ │ │ ├── state.es6 │ │ │ ├── logs.es6 │ │ │ ├── requestGroups.es6 │ │ │ ├── sandbox.es6 │ │ │ ├── users.es6 │ │ │ ├── webhooks.es6 │ │ │ ├── inactive.es6 │ │ │ ├── utilization.es6 │ │ │ ├── deploys.es6 │ │ │ └── racks.es6 │ │ └── activeTasks.es6 │ ├── assets │ │ ├── static │ │ │ ├── images │ │ │ │ ├── .gitkeep │ │ │ │ ├── favicon.ico │ │ │ │ └── icons │ │ │ │ │ └── icon-run_once.svg │ │ │ └── css │ │ │ │ ├── select2.png │ │ │ │ ├── select2x2.png │ │ │ │ └── select2-spinner.gif │ │ └── api-docs │ │ │ └── index.html.mustache │ ├── styles │ │ ├── index.styl │ │ ├── apiPrompts.styl │ │ ├── stylus │ │ │ ├── panels.styl │ │ │ ├── apiRootPrompt.styl │ │ │ ├── tableSubviewButtons.styl │ │ │ ├── pageNotFound.styl │ │ │ ├── file-browser.styl │ │ │ ├── jsonModal.styl │ │ │ ├── breadcrumbs.styl │ │ │ ├── runNowModal.styl │ │ │ ├── helpers.styl │ │ │ ├── color-helpers.styl │ │ │ ├── charts.styl │ │ │ ├── vendorOverrides.styl │ │ │ ├── layout.styl │ │ │ ├── searchInput.styl │ │ │ ├── dashboard.styl │ │ │ ├── circular-progress-bar.styl │ │ │ ├── forms.styl │ │ │ ├── requestsFilter.styl │ │ │ ├── bootstrap-tweaks.styl │ │ │ ├── colors.styl │ │ │ └── lists.styl │ │ ├── scss │ │ │ ├── duration-input.scss │ │ │ ├── ui-table.scss │ │ │ └── ansi-log-styles.scss │ │ └── index.scss │ ├── components │ │ ├── taskDetail │ │ │ └── TaskStatus.es6 │ │ ├── common │ │ │ ├── Loader.jsx │ │ │ ├── modal │ │ │ │ └── ModalWrapper.es6 │ │ │ ├── formItems │ │ │ │ ├── ReduxSelect.jsx │ │ │ │ └── formGroups │ │ │ │ │ ├── CheckboxFormGroup.jsx │ │ │ │ │ └── MultiInputFormGroup.jsx │ │ │ ├── NotFound.jsx │ │ │ ├── Section.jsx │ │ │ ├── Title.jsx │ │ │ ├── modalButtons │ │ │ │ ├── EnableHealthchecksButton.jsx │ │ │ │ ├── DisableHealthchecksButton.jsx │ │ │ │ ├── CancelDeployButton.jsx │ │ │ │ └── AdvanceDeployButton.jsx │ │ │ ├── icons │ │ │ │ └── RequestTypeIcon.jsx │ │ │ ├── Breadcrumbs.jsx │ │ │ └── CollapsableSection.jsx │ │ ├── logs │ │ │ ├── LoadingSpinner.jsx │ │ │ ├── Footer.jsx │ │ │ ├── TaskStatusIndicator.jsx │ │ │ └── NewColorDropdown.jsx │ │ ├── machines │ │ │ ├── usage │ │ │ │ └── LabeledColumn.jsx │ │ │ └── Constants.jsx │ │ └── apidocs │ │ │ └── SwaggerUI.jsx │ ├── reducers │ │ ├── ui │ │ │ ├── index.es6 │ │ │ ├── globalSearch.es6 │ │ │ ├── slaves.es6 │ │ │ ├── form.es6 │ │ │ └── refresh.es6 │ │ ├── activeRequest.es6 │ │ └── api │ │ │ └── keyed.es6 │ ├── containers │ │ ├── ApiDocsContainer.jsx │ │ ├── TaskLogTailerContainer.jsx │ │ └── CustomLogTailerContainer.jsx │ └── store.es6 ├── .gitignore ├── test │ ├── reducers │ │ └── index.js │ ├── index.test.js │ └── utils.test.js ├── SingularityTailer │ ├── .gitignore │ ├── test │ │ ├── index.test.js │ │ └── index.html │ ├── .babelrc │ ├── src │ │ ├── index.js │ │ ├── reducers │ │ │ └── index.js │ │ ├── components │ │ │ ├── index.js │ │ │ ├── DangerousLineRenderGroup.js │ │ │ ├── connectToTailer.js │ │ │ ├── TailerProvider.js │ │ │ └── SimpleLogLines.js │ │ └── styles │ │ │ └── index.scss │ ├── index.html │ ├── example │ │ ├── LoadTests.js │ │ ├── AppRouter.js │ │ └── SandboxTailerPage.js │ ├── server.js │ └── webpack.config.js ├── webpack.config.js ├── .babelrc ├── .eslintrc.json ├── README.md └── .blazar.yaml ├── EmbedSingularityExample ├── .build-executable └── .blazar.yaml ├── SingularityS3Downloader ├── .build-executable ├── .blazar.yaml └── src │ └── main │ └── java │ └── com │ └── hubspot │ └── singularity │ └── s3downloader │ └── server │ └── DownloadListener.java ├── SingularityS3Uploader ├── .build-executable ├── .blazar.yaml └── src │ └── main │ └── java │ └── com │ └── hubspot │ └── singularity │ └── s3uploader │ ├── UploaderFileAttributes.java │ └── config │ └── SingularityS3UploaderModule.java ├── SingularityExecutorCleanup ├── .build-executable ├── .blazar.yaml └── src │ └── main │ └── java │ └── com │ └── hubspot │ └── singularity │ └── executor │ └── cleanup │ └── config │ └── SingularityExecutorCleanupModule.java ├── .hubspot-blazar-discovery.yaml ├── .blazar.yaml ├── SingularityBase ├── .blazar.yaml └── src │ └── main │ └── java │ └── com │ └── hubspot │ ├── singularity │ ├── OrderDirection.java │ ├── MachineLoadMetric.java │ ├── SingularityAuthorizationScope.java │ ├── WebhookType.java │ ├── MetadataLevel.java │ ├── ScheduleType.java │ ├── SingularityCreateResult.java │ ├── SingularityDeleteResult.java │ ├── SingularityEmailDestination.java │ ├── SlavePlacement.java │ ├── SingularityHistoryItem.java │ ├── InvalidSingularityTaskIdException.java │ ├── HealthcheckMethod.java │ ├── SingularityDeployFailureReason.java │ ├── HealthcheckProtocol.java │ ├── RequestState.java │ ├── SingularityDisasterType.java │ ├── SlaveMatchState.java │ ├── SingularityId.java │ ├── RequestCleanupType.java │ ├── MachineState.java │ ├── SingularityTaskCleanupResult.java │ ├── executor │ │ └── SingularityExecutorLogrotateFrequency.java │ ├── SingularityEmailType.java │ ├── JsonHelpers.java │ ├── expiring │ │ └── SingularityExpiringPause.java │ ├── DeployState.java │ ├── SingularityCheckingUpstreamsUpdate.java │ └── SingularityTaskIdHolder.java │ └── mesos │ ├── SingularityDockerVolumeMode.java │ ├── SingularityContainerType.java │ ├── SingularityDockerNetworkType.java │ ├── SingularityMesosImageType.java │ ├── SingularityPortMappingType.java │ ├── protos │ ├── MesosTaskState.java │ ├── MesosStringValue.java │ └── MesosLabels.java │ ├── SingularityVolumeSourceType.java │ └── json │ └── MesosMasterMetricsSnapshotObject.java ├── SingularityClient ├── .blazar.yaml └── src │ ├── main │ └── java │ │ └── com │ │ └── hubspot │ │ └── singularity │ │ └── client │ │ ├── ProviderUtils.java │ │ └── SingularityClientException.java │ └── test │ └── java │ └── com │ └── hubspot │ └── singularity │ └── client │ └── SingularityClientModuleTest.java ├── SingularityS3Base ├── .blazar.yaml └── src │ └── main │ └── java │ └── com │ └── hubspot │ └── singularity │ └── s3 │ └── base │ ├── CacheCheckResult.java │ ├── CacheCheck.java │ └── SingularityS3BaseModule.java ├── cookbook └── README.md ├── styles └── website.css ├── Docs ├── images │ ├── deploy.png │ ├── HubSpot_PaaS.png │ ├── singularity.png │ ├── Mesos_Frameworks.png │ ├── framework_components.png │ ├── singularity_ui_json.png │ ├── singularity_ui_racks.png │ ├── dcos │ │ ├── singularity_large.png │ │ ├── singularity_medium.png │ │ └── singularity_small.png │ ├── singularity_ui_deploy.png │ ├── singularity_ui_request.png │ ├── singularity_ui_requests.png │ ├── singularity_ui_slaves.png │ ├── singularity_ui_status.png │ ├── singularity_ui_dashboard.png │ ├── singularity_ui_active_task.png │ ├── singularity_ui_command_history.png │ ├── singularity_ui_command_queued.png │ ├── singularity_ui_historical_task.png │ └── singularity_ui_shell_commands.png ├── releases │ ├── 0.20.1.md │ ├── index.md │ ├── 0.17.1.md │ ├── 0.19.1.md │ ├── 0.16.1.md │ ├── 0.16.2.md │ ├── 0.7.0.md │ ├── 0.6.2.md │ ├── 0.18.2.md │ ├── 0.7.1.md │ ├── 0.6.1.md │ ├── 0.18.1.md │ ├── 0.4.7.md │ ├── 0.4.11.md │ ├── 0.15.1.md │ ├── 0.14.1.md │ └── 0.4.5.md ├── about │ └── adopters.md └── reference │ └── api.html ├── SingularityMesosClient └── .blazar.yaml ├── SingularityRunnerBase ├── .blazar.yaml └── src │ └── main │ └── java │ └── com │ └── hubspot │ └── singularity │ └── runner │ └── base │ ├── shared │ ├── SingularityUploaderType.java │ ├── SingularityDriver.java │ ├── Signal.java │ ├── ExceptionChainParser.java │ ├── ProcessFailedException.java │ └── CompressionType.java │ ├── config │ └── MissingConfigException.java │ ├── configuration │ └── Configuration.java │ ├── jackson │ ├── Obfuscate.java │ └── ObfuscateModule.java │ └── validators │ └── DirectoryExistsValidator.java ├── SingularityServiceIntegrationTests ├── .blazar.yaml └── src │ ├── main │ └── java │ │ └── com │ │ └── hubspot │ │ └── singularity │ │ └── ServiceIntegrationTests.java │ └── test │ └── java │ └── com │ └── hubspot │ └── singularity │ └── SingularityStateIT.java ├── .travis.yml ├── .bookignore ├── sync_with_master.sh ├── publish_gitbook.sh ├── .gitignore ├── docker_release.sh └── book.json /.build-jdk8: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.blazar-enabled: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /scripts/logfetch/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SingularityExecutor/.build-executable: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SingularityService/.build-executable: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SingularityUI/app/actions/ui/tail.es6: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /EmbedSingularityExample/.build-executable: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SingularityS3Downloader/.build-executable: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SingularityS3Uploader/.build-executable: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SingularityExecutorCleanup/.build-executable: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SingularityUI/app/assets/static/images/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SingularityUI/.gitignore: -------------------------------------------------------------------------------- 1 | node 2 | /dist 3 | /target 4 | -------------------------------------------------------------------------------- /SingularityUI/app/styles/index.styl: -------------------------------------------------------------------------------- 1 | @require 'stylus/*' 2 | -------------------------------------------------------------------------------- /.hubspot-blazar-discovery.yaml: -------------------------------------------------------------------------------- 1 | disabledDiscoveries: ["docker"] 2 | -------------------------------------------------------------------------------- /scripts/setup.cfg: -------------------------------------------------------------------------------- 1 | [metadata] 2 | description-file = README.md 3 | -------------------------------------------------------------------------------- /SingularityUI/test/reducers/index.js: -------------------------------------------------------------------------------- 1 | import './tailerView.test'; 2 | -------------------------------------------------------------------------------- /SingularityUI/SingularityTailer/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | lib 4 | -------------------------------------------------------------------------------- /.blazar.yaml: -------------------------------------------------------------------------------- 1 | env: 2 | SET_VERSION_OVERRIDE: "0.22.0-$GIT_BRANCH-SNAPSHOT" 3 | -------------------------------------------------------------------------------- /SingularityService/src/test/resources/configs/just_a_string.yaml: -------------------------------------------------------------------------------- 1 | "this is just a string!" 2 | -------------------------------------------------------------------------------- /SingularityUI/SingularityTailer/test/index.test.js: -------------------------------------------------------------------------------- 1 | import './reducers/files.test.js'; 2 | -------------------------------------------------------------------------------- /SingularityBase/.blazar.yaml: -------------------------------------------------------------------------------- 1 | env: 2 | SET_VERSION_OVERRIDE: "0.22.0-$GIT_BRANCH-SNAPSHOT" 3 | -------------------------------------------------------------------------------- /SingularityClient/.blazar.yaml: -------------------------------------------------------------------------------- 1 | env: 2 | SET_VERSION_OVERRIDE: "0.22.0-$GIT_BRANCH-SNAPSHOT" 3 | -------------------------------------------------------------------------------- /SingularityS3Base/.blazar.yaml: -------------------------------------------------------------------------------- 1 | env: 2 | SET_VERSION_OVERRIDE: "0.22.0-$GIT_BRANCH-SNAPSHOT" 3 | -------------------------------------------------------------------------------- /SingularityUI/app/styles/apiPrompts.styl: -------------------------------------------------------------------------------- 1 | #api-prompt-message 2 | p 3 | margin-bottom 1.2em 4 | -------------------------------------------------------------------------------- /cookbook/README.md: -------------------------------------------------------------------------------- 1 | The cookbook [has moved](https://github.com/evertrue/singularity-cookbook). 2 | -------------------------------------------------------------------------------- /styles/website.css: -------------------------------------------------------------------------------- 1 | .book .book-body .page-wrapper .page-inner section.normal {overflow: scroll} -------------------------------------------------------------------------------- /Docs/images/deploy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/Singularity/master/Docs/images/deploy.png -------------------------------------------------------------------------------- /SingularityMesosClient/.blazar.yaml: -------------------------------------------------------------------------------- 1 | env: 2 | SET_VERSION_OVERRIDE: "0.22.0-$GIT_BRANCH-SNAPSHOT" 3 | -------------------------------------------------------------------------------- /SingularityRunnerBase/.blazar.yaml: -------------------------------------------------------------------------------- 1 | env: 2 | SET_VERSION_OVERRIDE: "0.22.0-$GIT_BRANCH-SNAPSHOT" 3 | -------------------------------------------------------------------------------- /scripts/logfetch/errors.py: -------------------------------------------------------------------------------- 1 | 2 | class Error(Exception): pass 3 | 4 | class NoTailDataError(Error): pass 5 | -------------------------------------------------------------------------------- /Docs/images/HubSpot_PaaS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/Singularity/master/Docs/images/HubSpot_PaaS.png -------------------------------------------------------------------------------- /Docs/images/singularity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/Singularity/master/Docs/images/singularity.png -------------------------------------------------------------------------------- /SingularityUI/app/styles/stylus/panels.styl: -------------------------------------------------------------------------------- 1 | 2 | .panel-heading--narrow 3 | h1, h2, h3, h4, h5 4 | margin: 0 -------------------------------------------------------------------------------- /SingularityUI/test/index.test.js: -------------------------------------------------------------------------------- 1 | import 'core-js/es6'; 2 | 3 | import './utils.test'; 4 | import './reducers'; -------------------------------------------------------------------------------- /SingularityExecutor/src/main/docker/config/singularity.s3base.yaml: -------------------------------------------------------------------------------- 1 | artifactCacheDirectory: /usr/share/mesos/artifacts -------------------------------------------------------------------------------- /SingularityServiceIntegrationTests/.blazar.yaml: -------------------------------------------------------------------------------- 1 | env: 2 | SET_VERSION_OVERRIDE: "0.22.0-$GIT_BRANCH-SNAPSHOT" 3 | -------------------------------------------------------------------------------- /SingularityUI/app/styles/stylus/apiRootPrompt.styl: -------------------------------------------------------------------------------- 1 | #api-root-prompt-message 2 | 3 | p 4 | margin-bottom 1.2em 5 | -------------------------------------------------------------------------------- /SingularityUI/app/styles/stylus/tableSubviewButtons.styl: -------------------------------------------------------------------------------- 1 | .table-subview-buttons 2 | text-align center 3 | 4 | -------------------------------------------------------------------------------- /SingularityUI/webpack.config.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./make-webpack-config')({ 2 | isDebug: false 3 | }); 4 | -------------------------------------------------------------------------------- /Docs/images/Mesos_Frameworks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/Singularity/master/Docs/images/Mesos_Frameworks.png -------------------------------------------------------------------------------- /Docs/images/framework_components.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/Singularity/master/Docs/images/framework_components.png -------------------------------------------------------------------------------- /Docs/images/singularity_ui_json.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/Singularity/master/Docs/images/singularity_ui_json.png -------------------------------------------------------------------------------- /Docs/images/singularity_ui_racks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/Singularity/master/Docs/images/singularity_ui_racks.png -------------------------------------------------------------------------------- /Docs/images/dcos/singularity_large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/Singularity/master/Docs/images/dcos/singularity_large.png -------------------------------------------------------------------------------- /Docs/images/dcos/singularity_medium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/Singularity/master/Docs/images/dcos/singularity_medium.png -------------------------------------------------------------------------------- /Docs/images/dcos/singularity_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/Singularity/master/Docs/images/dcos/singularity_small.png -------------------------------------------------------------------------------- /Docs/images/singularity_ui_deploy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/Singularity/master/Docs/images/singularity_ui_deploy.png -------------------------------------------------------------------------------- /Docs/images/singularity_ui_request.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/Singularity/master/Docs/images/singularity_ui_request.png -------------------------------------------------------------------------------- /Docs/images/singularity_ui_requests.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/Singularity/master/Docs/images/singularity_ui_requests.png -------------------------------------------------------------------------------- /Docs/images/singularity_ui_slaves.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/Singularity/master/Docs/images/singularity_ui_slaves.png -------------------------------------------------------------------------------- /Docs/images/singularity_ui_status.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/Singularity/master/Docs/images/singularity_ui_status.png -------------------------------------------------------------------------------- /Docs/images/singularity_ui_dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/Singularity/master/Docs/images/singularity_ui_dashboard.png -------------------------------------------------------------------------------- /Docs/images/singularity_ui_active_task.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/Singularity/master/Docs/images/singularity_ui_active_task.png -------------------------------------------------------------------------------- /Docs/images/singularity_ui_command_history.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/Singularity/master/Docs/images/singularity_ui_command_history.png -------------------------------------------------------------------------------- /Docs/images/singularity_ui_command_queued.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/Singularity/master/Docs/images/singularity_ui_command_queued.png -------------------------------------------------------------------------------- /Docs/images/singularity_ui_historical_task.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/Singularity/master/Docs/images/singularity_ui_historical_task.png -------------------------------------------------------------------------------- /Docs/images/singularity_ui_shell_commands.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/Singularity/master/Docs/images/singularity_ui_shell_commands.png -------------------------------------------------------------------------------- /SingularityUI/app/assets/static/css/select2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/Singularity/master/SingularityUI/app/assets/static/css/select2.png -------------------------------------------------------------------------------- /SingularityUI/app/assets/static/css/select2x2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/Singularity/master/SingularityUI/app/assets/static/css/select2x2.png -------------------------------------------------------------------------------- /SingularityUI/app/assets/static/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/Singularity/master/SingularityUI/app/assets/static/images/favicon.ico -------------------------------------------------------------------------------- /SingularityUI/app/styles/scss/duration-input.scss: -------------------------------------------------------------------------------- 1 | 2 | .duration-input { 3 | & label { 4 | font-weight: 400; 5 | margin: 0px 5px; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /SingularityUI/app/styles/stylus/pageNotFound.styl: -------------------------------------------------------------------------------- 1 | #page-not-found-wrapper 2 | position fixed 3 | top 0 4 | left 0 5 | right 0 6 | bottom 0 -------------------------------------------------------------------------------- /SingularityExecutor/src/test/resources/config/executor-conf-dockerauth-fromconfig.yaml: -------------------------------------------------------------------------------- 1 | executor: 2 | 3 | dockerAuthConfig: 4 | fromDockerConfig: true 5 | -------------------------------------------------------------------------------- /scripts/.blazar.yaml: -------------------------------------------------------------------------------- 1 | buildpack: 2 | host: git.hubteam.com 3 | organization: HubSpotProtected 4 | repository: Blazar-Buildpack-Python 5 | branch: master 6 | -------------------------------------------------------------------------------- /SingularityUI/app/assets/static/css/select2-spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/Singularity/master/SingularityUI/app/assets/static/css/select2-spinner.gif -------------------------------------------------------------------------------- /SingularityExecutor/src/main/docker/executable/singularity-executor: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | exec java -Djava.library.path=/usr/local/lib -jar /etc/singularity/SingularityExecutor.jar -------------------------------------------------------------------------------- /SingularityService/src/test/resources/configs/override.yaml: -------------------------------------------------------------------------------- 1 | cacheTasksInitialSize: 500 2 | checkDeploysEverySeconds: 100 3 | 4 | database: 5 | password: "overridepassword" 6 | -------------------------------------------------------------------------------- /SingularityBase/src/main/java/com/hubspot/singularity/OrderDirection.java: -------------------------------------------------------------------------------- 1 | package com.hubspot.singularity; 2 | 3 | public enum OrderDirection { 4 | 5 | ASC, DESC; 6 | 7 | } 8 | 9 | -------------------------------------------------------------------------------- /SingularityUI/app/actions/api/auth.es6: -------------------------------------------------------------------------------- 1 | import { buildApiAction } from './base'; 2 | 3 | export const FetchUser = buildApiAction( 4 | 'FETCH_USER', 5 | {url: '/auth/user'} 6 | ); 7 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: java 2 | jdk: 3 | - oraclejdk8 4 | 5 | install: false 6 | script: mvn -B -DskipSingularityWebUI verify 7 | cache: 8 | directories: 9 | - $HOME/.m2 10 | -------------------------------------------------------------------------------- /SingularityBase/src/main/java/com/hubspot/singularity/MachineLoadMetric.java: -------------------------------------------------------------------------------- 1 | package com.hubspot.singularity; 2 | 3 | public enum MachineLoadMetric { 4 | LOAD_1, LOAD_5, LOAD_15 5 | } 6 | -------------------------------------------------------------------------------- /SingularityExecutor/src/main/resources/logrotate.cron.hbs: -------------------------------------------------------------------------------- 1 | {{{ cronSchedule }}} root {{{ logrotateCommand }}} -f -s {{{ logrotateStateFile }}} {{{ logrotateConfig }}} {{{ outputRedirect }}} 2 | -------------------------------------------------------------------------------- /SingularityUI/SingularityTailer/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["es2015", "react"], 3 | "plugins": [ 4 | "transform-object-rest-spread", 5 | "react-hot-loader/babel" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /SingularityUI/app/actions/ui/webhooks.es6: -------------------------------------------------------------------------------- 1 | import { FetchWebhooks } from '../../actions/api/webhooks'; 2 | 3 | export const refresh = () => (dispatch) => 4 | dispatch(FetchWebhooks.trigger()); -------------------------------------------------------------------------------- /SingularityService/src/main/java/com/hubspot/singularity/hooks/WebhookQueueType.java: -------------------------------------------------------------------------------- 1 | package com.hubspot.singularity.hooks; 2 | 3 | public enum WebhookQueueType { 4 | ZOOKEEPER, SNS 5 | } 6 | -------------------------------------------------------------------------------- /SingularityUI/app/actions/ui/title.es6: -------------------------------------------------------------------------------- 1 | import { updateTitle } from 'redux-title'; 2 | 3 | export const setTitle = (title) => (dispatch) => 4 | dispatch(updateTitle(`${title} - ${config.title}`)); -------------------------------------------------------------------------------- /scripts/logfetch/.logfetch.example: -------------------------------------------------------------------------------- 1 | singularity_uri_base: localhost:8080/singularity/v2/api 2 | dest: ~/.logfetch_cache 3 | num_parallel_fetches: 5 4 | check_size: 8192 5 | task_count: 1 6 | 7 | -------------------------------------------------------------------------------- /SingularityUI/app/actions/ui/groupDetail.es6: -------------------------------------------------------------------------------- 1 | import { FetchGroups } from '../../actions/api/requestGroups'; 2 | 3 | export const refresh = () => (dispatch) => 4 | dispatch(FetchGroups.trigger()); 5 | -------------------------------------------------------------------------------- /EmbedSingularityExample/.blazar.yaml: -------------------------------------------------------------------------------- 1 | env: 2 | MAVEN_ARGS: "-T 8 -Dsingularity.jar.name.format=\\${project.artifactId} -Dgpg.skip=true -DforkCount=2C" 3 | SET_VERSION_OVERRIDE: "0.22.0-$GIT_BRANCH-SNAPSHOT" 4 | -------------------------------------------------------------------------------- /SingularityExecutor/.blazar.yaml: -------------------------------------------------------------------------------- 1 | env: 2 | MAVEN_ARGS: "-T 8 -Dsingularity.jar.name.format=\\${project.artifactId} -Dgpg.skip=true -DforkCount=2C" 3 | SET_VERSION_OVERRIDE: "0.22.0-$GIT_BRANCH-SNAPSHOT" 4 | -------------------------------------------------------------------------------- /SingularityExecutor/src/main/docker/config/singularity.base.yaml: -------------------------------------------------------------------------------- 1 | loggingDirectory: /etc/singularity 2 | logWatcherMetadataDirectory: /usr/share/mesos/logwatcher 3 | s3UploaderMetadataDirectory: /usr/share/mesos/s3 -------------------------------------------------------------------------------- /SingularityS3Downloader/.blazar.yaml: -------------------------------------------------------------------------------- 1 | env: 2 | MAVEN_ARGS: "-T 8 -Dsingularity.jar.name.format=\\${project.artifactId} -Dgpg.skip=true -DforkCount=2C" 3 | SET_VERSION_OVERRIDE: "0.22.0-$GIT_BRANCH-SNAPSHOT" 4 | -------------------------------------------------------------------------------- /SingularityS3Uploader/.blazar.yaml: -------------------------------------------------------------------------------- 1 | env: 2 | MAVEN_ARGS: "-T 8 -Dsingularity.jar.name.format=\\${project.artifactId} -Dgpg.skip=true -DforkCount=2C" 3 | SET_VERSION_OVERRIDE: "0.22.0-$GIT_BRANCH-SNAPSHOT" 4 | -------------------------------------------------------------------------------- /SingularityUI/app/actions/api/state.es6: -------------------------------------------------------------------------------- 1 | import { buildApiAction } from './base'; 2 | 3 | export const FetchSingularityStatus = buildApiAction( 4 | 'FETCH_SINGULARITY_STATUS', 5 | {url: '/state'} 6 | ); 7 | -------------------------------------------------------------------------------- /SingularityUI/app/actions/ui/status.es6: -------------------------------------------------------------------------------- 1 | import { FetchSingularityStatus } from '../../actions/api/state'; 2 | 3 | export const refresh = () => (dispatch) => 4 | dispatch(FetchSingularityStatus.trigger()); 5 | -------------------------------------------------------------------------------- /SingularityExecutorCleanup/.blazar.yaml: -------------------------------------------------------------------------------- 1 | env: 2 | MAVEN_ARGS: "-T 8 -Dsingularity.jar.name.format=\\${project.artifactId} -Dgpg.skip=true -DforkCount=2C" 3 | SET_VERSION_OVERRIDE: "0.22.0-$GIT_BRANCH-SNAPSHOT" 4 | -------------------------------------------------------------------------------- /SingularityUI/app/styles/stylus/file-browser.styl: -------------------------------------------------------------------------------- 1 | .file-browser-header small 2 | display none 3 | 4 | .expanded .file-browser-header small 5 | display inline 6 | 7 | .file-name 8 | margin-left 10px 9 | -------------------------------------------------------------------------------- /SingularityBase/src/main/java/com/hubspot/singularity/SingularityAuthorizationScope.java: -------------------------------------------------------------------------------- 1 | package com.hubspot.singularity; 2 | 3 | public enum SingularityAuthorizationScope { 4 | READ, 5 | WRITE, 6 | ADMIN 7 | } 8 | -------------------------------------------------------------------------------- /SingularityExecutor/src/main/java/com/hubspot/singularity/executor/models/ThreadCheckerType.java: -------------------------------------------------------------------------------- 1 | package com.hubspot.singularity.executor.models; 2 | 3 | public enum ThreadCheckerType { 4 | CGROUP, PS, PROC_STATUS 5 | } 6 | -------------------------------------------------------------------------------- /SingularityUI/app/actions/ui/taskSearch.es6: -------------------------------------------------------------------------------- 1 | import { FetchTaskSearchParams } from '../../actions/api/history'; 2 | 3 | export const UpdateFilter = (filter) => ({ 4 | filter, 5 | type: 'UPDATE_TASK_SEARCH_FILTER' 6 | }); 7 | -------------------------------------------------------------------------------- /SingularityUI/app/styles/index.scss: -------------------------------------------------------------------------------- 1 | $icon-font-path: "~bootstrap-sass/assets/fonts/bootstrap/"; 2 | @import "~bootstrap-sass/assets/stylesheets/bootstrap"; 3 | 4 | @import "./scss/ui-table"; 5 | @import "./scss/new-tailer"; 6 | -------------------------------------------------------------------------------- /SingularityExecutor/src/main/java/com/hubspot/singularity/executor/task/TaskCleanupResult.java: -------------------------------------------------------------------------------- 1 | package com.hubspot.singularity.executor.task; 2 | 3 | public enum TaskCleanupResult { 4 | 5 | SUCCESS, WAITING, ERROR; 6 | 7 | } 8 | -------------------------------------------------------------------------------- /SingularityRunnerBase/src/main/java/com/hubspot/singularity/runner/base/shared/SingularityUploaderType.java: -------------------------------------------------------------------------------- 1 | package com.hubspot.singularity.runner.base.shared; 2 | 3 | public enum SingularityUploaderType { 4 | S3, GCS 5 | } 6 | -------------------------------------------------------------------------------- /SingularityService/src/main/java/com/hubspot/singularity/hooks/AbstractWebhookChecker.java: -------------------------------------------------------------------------------- 1 | package com.hubspot.singularity.hooks; 2 | 3 | public abstract class AbstractWebhookChecker { 4 | abstract void checkWebhooks(); 5 | } 6 | -------------------------------------------------------------------------------- /SingularityS3Base/src/main/java/com/hubspot/singularity/s3/base/CacheCheckResult.java: -------------------------------------------------------------------------------- 1 | package com.hubspot.singularity.s3.base; 2 | 3 | public enum CacheCheckResult { 4 | FOUND, DOES_NOT_EXIST, FILE_SIZE_MISMATCH, MD5_MISMATCH 5 | } 6 | -------------------------------------------------------------------------------- /SingularityExecutor/src/main/resources/deploy.env.hbs: -------------------------------------------------------------------------------- 1 | # mesos task env 2 | {{#each env}} 3 | export {{{name}}}={{{bashEscaped value}}} 4 | {{/each}} 5 | 6 | # HubSpot-Specific-TODO 7 | export RODAN_HOSTNAME="$TASK_REQUEST_ID-$INSTANCE_NO" 8 | -------------------------------------------------------------------------------- /SingularityExecutor/src/test/resources/config/executor-conf-dockerauth.yaml: -------------------------------------------------------------------------------- 1 | executor: 2 | 3 | dockerAuthConfig: 4 | username: dockeruser 5 | password: dockerpassword 6 | serverAddress: https://private.docker.registry/path 7 | -------------------------------------------------------------------------------- /SingularityUI/app/components/taskDetail/TaskStatus.es6: -------------------------------------------------------------------------------- 1 | const RUNNING = 'RUNNING'; 2 | const STOPPED = 'STOPPED'; 3 | const NEVER_RAN = 'NEVER_RAN'; 4 | 5 | export default { 6 | RUNNING, 7 | STOPPED, 8 | NEVER_RAN 9 | }; 10 | -------------------------------------------------------------------------------- /SingularityBase/src/main/java/com/hubspot/singularity/WebhookType.java: -------------------------------------------------------------------------------- 1 | package com.hubspot.singularity; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | @Schema 6 | public enum WebhookType { 7 | TASK, REQUEST, DEPLOY 8 | } 9 | -------------------------------------------------------------------------------- /.bookignore: -------------------------------------------------------------------------------- 1 | cookbook 2 | eclipse 3 | EmbedSingularityExample 4 | mysql 5 | node_modules 6 | scripts 7 | Singularity* 8 | target 9 | vagrant 10 | .travis.yml 11 | compose-dev.yml 12 | docker-compose.yml 13 | pom.xml 14 | dev 15 | *.sh 16 | *.py -------------------------------------------------------------------------------- /Docs/releases/0.20.1.md: -------------------------------------------------------------------------------- 1 | ## Changes in `0.20.1` 2 | 3 | This is a bug fix release 4 | 5 | ### Bug Fixes 6 | 7 | - Check for undefined request data in UI (0daf792)[https://github.com/HubSpot/Singularity/commit/0daf7929ae6c58ce10ebd5dc88deff4bc6d193e3] -------------------------------------------------------------------------------- /SingularityBase/src/main/java/com/hubspot/mesos/SingularityDockerVolumeMode.java: -------------------------------------------------------------------------------- 1 | package com.hubspot.mesos; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | @Schema 6 | public enum SingularityDockerVolumeMode { 7 | RO, RW 8 | } 9 | -------------------------------------------------------------------------------- /SingularityBase/src/main/java/com/hubspot/singularity/MetadataLevel.java: -------------------------------------------------------------------------------- 1 | package com.hubspot.singularity; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | @Schema 6 | public enum MetadataLevel { 7 | INFO, WARN, ERROR 8 | } 9 | -------------------------------------------------------------------------------- /SingularityBase/src/main/java/com/hubspot/singularity/ScheduleType.java: -------------------------------------------------------------------------------- 1 | package com.hubspot.singularity; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | @Schema 6 | public enum ScheduleType { 7 | CRON, QUARTZ, RFC5545 8 | } 9 | -------------------------------------------------------------------------------- /SingularityUI/app/styles/stylus/jsonModal.styl: -------------------------------------------------------------------------------- 1 | .json-modal 2 | padding 0 !important 3 | font-family Consolas, "Liberation Mono", Menlo, Courier, monospace 4 | 5 | .constrained-modal 6 | max-height: calc(100vh - 160px) 7 | overflow: auto 8 | -------------------------------------------------------------------------------- /SingularityBase/src/main/java/com/hubspot/mesos/SingularityContainerType.java: -------------------------------------------------------------------------------- 1 | package com.hubspot.mesos; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | @Schema 6 | public enum SingularityContainerType { 7 | MESOS, DOCKER 8 | } 9 | -------------------------------------------------------------------------------- /SingularityExecutor/src/main/docker/config/singularity.executor.yaml: -------------------------------------------------------------------------------- 1 | globalTaskDefinitionDirectory: /usr/share/mesos 2 | defaultRunAsUser: root 3 | s3UploaderKeyPattern: '%requestId/%Y/%m/%taskId_%index-%s%fileext' 4 | s3UploaderBucket: singularity-task-logs -------------------------------------------------------------------------------- /SingularityUI/SingularityTailer/src/index.js: -------------------------------------------------------------------------------- 1 | import * as actions from './actions'; 2 | 3 | export { TailerProvider, DangerousLineRenderGroup, SandboxTailer } from './components'; 4 | export { actions }; 5 | export { default as reducer } from './reducers'; 6 | -------------------------------------------------------------------------------- /SingularityBase/src/main/java/com/hubspot/mesos/SingularityDockerNetworkType.java: -------------------------------------------------------------------------------- 1 | package com.hubspot.mesos; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | @Schema 6 | public enum SingularityDockerNetworkType { 7 | BRIDGE, HOST, NONE 8 | } 9 | -------------------------------------------------------------------------------- /SingularityBase/src/main/java/com/hubspot/singularity/SingularityCreateResult.java: -------------------------------------------------------------------------------- 1 | package com.hubspot.singularity; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | @Schema 6 | public enum SingularityCreateResult { 7 | CREATED, EXISTED; 8 | } 9 | -------------------------------------------------------------------------------- /SingularityBase/src/main/java/com/hubspot/singularity/SingularityDeleteResult.java: -------------------------------------------------------------------------------- 1 | package com.hubspot.singularity; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | @Schema 6 | public enum SingularityDeleteResult { 7 | DELETED, DIDNT_EXIST 8 | } 9 | -------------------------------------------------------------------------------- /SingularityUI/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["es2015"], 3 | "plugins": [ 4 | "transform-runtime", 5 | "transform-react-jsx", 6 | "transform-object-rest-spread", 7 | "transform-class-properties", 8 | "react-hot-loader/babel" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /SingularityService/.blazar.yaml: -------------------------------------------------------------------------------- 1 | env: 2 | MAVEN_ARGS: "-T 8 -Dsingularity.jar.name.format=\\${project.artifactId} -Dgpg.skip=true -DforkCount=2C" 3 | SET_VERSION_OVERRIDE: "0.22.0-$GIT_BRANCH-SNAPSHOT" 4 | 5 | buildResources: 6 | cpus: 8 7 | memoryMb: 10240 8 | 9 | -------------------------------------------------------------------------------- /SingularityBase/src/main/java/com/hubspot/singularity/SingularityEmailDestination.java: -------------------------------------------------------------------------------- 1 | package com.hubspot.singularity; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | @Schema 6 | public enum SingularityEmailDestination { 7 | OWNERS, ACTION_TAKER, ADMINS 8 | } 9 | -------------------------------------------------------------------------------- /SingularityRunnerBase/src/main/java/com/hubspot/singularity/runner/base/shared/SingularityDriver.java: -------------------------------------------------------------------------------- 1 | package com.hubspot.singularity.runner.base.shared; 2 | 3 | public interface SingularityDriver { 4 | 5 | void startAndWait(); 6 | 7 | void shutdown(); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /SingularityService/src/main/java/com/hubspot/singularity/mesos/EventBufferOverflowException.java: -------------------------------------------------------------------------------- 1 | package com.hubspot.singularity.mesos; 2 | 3 | class EventBufferOverflowException extends Exception { 4 | EventBufferOverflowException(String message) { 5 | super(message); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /SingularityUI/app/actions/api/logs.es6: -------------------------------------------------------------------------------- 1 | import { buildApiAction } from './base'; 2 | 3 | export const FetchTaskS3Logs = buildApiAction( 4 | 'FETCH_TASK_S3_LOGS', 5 | (taskId, catchStatusCodes) => ({ 6 | url: `/logs/task/${taskId}`, 7 | catchStatusCodes 8 | }) 9 | ); 10 | -------------------------------------------------------------------------------- /SingularityUI/app/assets/api-docs/index.html.mustache: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Singularity REST API 5 | 6 | 7 | 8 | {{>markdown}} 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /SingularityUI/app/styles/stylus/breadcrumbs.styl: -------------------------------------------------------------------------------- 1 | .breadcrumb 2 | 3 | li 4 | max-width 33% 5 | max-height 1.3em 6 | white-space nowrap 7 | overflow hidden 8 | text-overflow ellipsis 9 | 10 | .pull-right 11 | white-space: nowrap 12 | -------------------------------------------------------------------------------- /SingularityService/src/test/java/com/hubspot/singularity/SingularityTestBaseNoDb.java: -------------------------------------------------------------------------------- 1 | package com.hubspot.singularity; 2 | 3 | public class SingularityTestBaseNoDb extends SingularityCuratorTestBase { 4 | 5 | public SingularityTestBaseNoDb() { 6 | super(false); 7 | } 8 | 9 | } 10 | -------------------------------------------------------------------------------- /SingularityServiceIntegrationTests/src/main/java/com/hubspot/singularity/ServiceIntegrationTests.java: -------------------------------------------------------------------------------- 1 | package com.hubspot.singularity; 2 | 3 | public class ServiceIntegrationTests { 4 | 5 | // No-op main class 6 | public static void main(String[] args) { 7 | 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /SingularityS3Downloader/src/main/java/com/hubspot/singularity/s3downloader/server/DownloadListener.java: -------------------------------------------------------------------------------- 1 | package com.hubspot.singularity.s3downloader.server; 2 | 3 | public interface DownloadListener { 4 | 5 | public void notifyDownloadFinished(SingularityS3DownloaderAsyncHandler handler); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /SingularityUI/SingularityTailer/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Singularity Tailer Example 6 | 7 | 8 |
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /SingularityUI/app/actions/api/requestGroups.es6: -------------------------------------------------------------------------------- 1 | import { buildApiAction } from './base'; 2 | 3 | export const FetchGroups = buildApiAction( 4 | 'FETCH_REQUEST_GROUPS', 5 | (catchStatusCodes = null) => ({ 6 | url: '/groups?useWebCache=true', 7 | catchStatusCodes 8 | }) 9 | ); 10 | -------------------------------------------------------------------------------- /SingularityUI/SingularityTailer/src/reducers/index.js: -------------------------------------------------------------------------------- 1 | import { combineReducers } from 'redux'; 2 | 3 | import files from './files'; 4 | import requests from './requests'; 5 | import config from './config'; 6 | 7 | export default combineReducers({ 8 | files, 9 | requests, 10 | config 11 | }); 12 | -------------------------------------------------------------------------------- /SingularityUI/app/styles/stylus/runNowModal.styl: -------------------------------------------------------------------------------- 1 | .dropdown-menu > .select-options * 2 | max-width: 515px; 3 | white-space: nowrap; 4 | min-width: 300px; 5 | overflow: hidden; 6 | text-overflow: ellipsis; 7 | 8 | .tooltip-inner 9 | white-space:nowrap; 10 | max-width:none; 11 | -------------------------------------------------------------------------------- /SingularityBase/src/main/java/com/hubspot/singularity/SlavePlacement.java: -------------------------------------------------------------------------------- 1 | package com.hubspot.singularity; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | @Schema 6 | public enum SlavePlacement { 7 | SEPARATE, OPTIMISTIC, GREEDY, SEPARATE_BY_DEPLOY, SEPARATE_BY_REQUEST, SPREAD_ALL_SLAVES 8 | } 9 | -------------------------------------------------------------------------------- /SingularityRunnerBase/src/main/java/com/hubspot/singularity/runner/base/config/MissingConfigException.java: -------------------------------------------------------------------------------- 1 | package com.hubspot.singularity.runner.base.config; 2 | 3 | public class MissingConfigException extends RuntimeException { 4 | public MissingConfigException(String message) { 5 | super(message); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /SingularityUI/app/actions/ui/tasks.es6: -------------------------------------------------------------------------------- 1 | import { FetchTasksInState, FetchTaskCleanups } from '../../actions/api/tasks'; 2 | 3 | export const refresh = (state) => (dispatch) => 4 | Promise.all([ 5 | dispatch(FetchTasksInState.trigger(state || 'active', true)), 6 | dispatch(FetchTaskCleanups.trigger()), 7 | ]); 8 | -------------------------------------------------------------------------------- /Docs/releases/index.md: -------------------------------------------------------------------------------- 1 | # Releases 2 | 3 | {% for release in book.releases %} 4 | - [Changes in {{release}}](#changes-in-{{release.replace(".", "").replace(".", "")}}){% endfor %} 5 | 6 | {% for release in book.releases %} 7 | {% set file = "./" + release + ".md" %} 8 | {% include file %} 9 | * * * 10 | {% endfor %} -------------------------------------------------------------------------------- /SingularityBase/src/main/java/com/hubspot/mesos/SingularityMesosImageType.java: -------------------------------------------------------------------------------- 1 | package com.hubspot.mesos; 2 | 3 | import com.google.common.annotations.Beta; 4 | 5 | import io.swagger.v3.oas.annotations.media.Schema; 6 | 7 | @Beta 8 | @Schema 9 | public enum SingularityMesosImageType { 10 | APPC, DOCKER 11 | } 12 | -------------------------------------------------------------------------------- /SingularityBase/src/main/java/com/hubspot/singularity/SingularityHistoryItem.java: -------------------------------------------------------------------------------- 1 | package com.hubspot.singularity; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnore; 4 | 5 | public interface SingularityHistoryItem { 6 | 7 | @JsonIgnore 8 | long getCreateTimestampForCalculatingHistoryAge(); 9 | 10 | } 11 | -------------------------------------------------------------------------------- /SingularityUI/app/styles/stylus/helpers.styl: -------------------------------------------------------------------------------- 1 | .roomy-right 2 | margin-right: 10px 3 | 4 | .half-roomy-right 5 | margin-right: 5px 6 | 7 | .roomy-left 8 | margin-left: 10px 9 | 10 | .half-roomy-left 11 | margin-left: 5px 12 | 13 | 14 | .page-width-normal 15 | max-width 1200px 16 | margin 0 auto 17 | -------------------------------------------------------------------------------- /Docs/releases/0.17.1.md: -------------------------------------------------------------------------------- 1 | ## Changes in `0.17.1` 2 | 3 | ***This is a bugfix release*** 4 | 5 | Check out the [0.17.1 milestone](https://github.com/HubSpot/Singularity/milestone/36?closed=1) to see bugfixes in detail. 6 | 7 | - [1740](https://github.com/HubSpot/Singularity/pull/1740) - Only send healthcheck object from ui when setting all fields 8 | -------------------------------------------------------------------------------- /Docs/releases/0.19.1.md: -------------------------------------------------------------------------------- 1 | ## Changes in `0.19.1` 2 | 3 | ***This is a bugfix release*** 4 | 5 | Check out the [0.19.1 milestone](https://github.com/HubSpot/Singularity/milestone/36?closed=1) to see bugfixes in detail. 6 | 7 | - [1740](https://github.com/HubSpot/Singularity/pull/1740) - Only send healthcheck object from ui when setting all fields 8 | -------------------------------------------------------------------------------- /SingularityService/src/test/resources/configs/default.yaml: -------------------------------------------------------------------------------- 1 | cacheTasksMaxSize: 10000 # override.yaml will not touch this 2 | cacheTasksInitialSize: 200 # override.yaml will override this to 500 3 | # override.yaml will override checkDeploysEverySeconds to 100 4 | 5 | database: # override.yaml will override some of this 6 | user: "baseuser" 7 | -------------------------------------------------------------------------------- /sync_with_master.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | git checkout hs_staging 5 | git pull 6 | git merge master --no-edit 7 | git push hs_staging 8 | 9 | git checkout hs_qa 10 | git pull 11 | git merge master --no-edit 12 | git push hs_qa 13 | 14 | git checkout hs_stable 15 | git pull 16 | git merge master --no-edit 17 | git push hs_stable -------------------------------------------------------------------------------- /SingularityBase/src/main/java/com/hubspot/mesos/SingularityPortMappingType.java: -------------------------------------------------------------------------------- 1 | package com.hubspot.mesos; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | @Schema 6 | public enum SingularityPortMappingType { 7 | LITERAL, // value == port number 8 | FROM_OFFER // value == index of ports resource in offer 9 | } 10 | -------------------------------------------------------------------------------- /SingularityService/src/main/java/com/hubspot/singularity/config/SingularityConfigurationMergeException.java: -------------------------------------------------------------------------------- 1 | package com.hubspot.singularity.config; 2 | 3 | public class SingularityConfigurationMergeException extends RuntimeException { 4 | public SingularityConfigurationMergeException(String message) { 5 | super(message); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /SingularityUI/app/reducers/ui/index.es6: -------------------------------------------------------------------------------- 1 | import { combineReducers } from 'redux'; 2 | 3 | import refresh from './refresh'; 4 | import form from './form'; 5 | import globalSearch from './globalSearch'; 6 | import slaves from './slaves'; 7 | 8 | export default combineReducers({ 9 | refresh, 10 | form, 11 | globalSearch, 12 | slaves 13 | }); 14 | -------------------------------------------------------------------------------- /SingularityBase/src/main/java/com/hubspot/singularity/InvalidSingularityTaskIdException.java: -------------------------------------------------------------------------------- 1 | package com.hubspot.singularity; 2 | 3 | @SuppressWarnings("serial") 4 | public class InvalidSingularityTaskIdException extends RuntimeException { 5 | 6 | public InvalidSingularityTaskIdException(String message) { 7 | super(message); 8 | } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /Docs/releases/0.16.1.md: -------------------------------------------------------------------------------- 1 | ## Changes in `0.16.1` 2 | 3 | ***This is a bugfix release*** 4 | 5 | Check out the [0.16.1 milestone](https://github.com/HubSpot/Singularity/issues?q=milestone%3A%0.16.1+is%3Aclosed) to see new features / bugfixes in detail. 6 | 7 | - [1580](https://github.com/HubSpot/Singularity/pull/1580) - Fix mapping of docker fields in 'new deploy' ui 8 | -------------------------------------------------------------------------------- /SingularityUI/app/components/common/Loader.jsx: -------------------------------------------------------------------------------- 1 | import React, { PropTypes } from 'react'; 2 | 3 | const Loader = ({fixed}) => ( 4 |
5 | ); 6 | 7 | Loader.propTypes = { 8 | fixed: PropTypes.bool 9 | }; 10 | 11 | Loader.defaultProps = { 12 | fixed: true 13 | }; 14 | 15 | export default Loader; 16 | -------------------------------------------------------------------------------- /Docs/releases/0.16.2.md: -------------------------------------------------------------------------------- 1 | ## Changes in `0.16.2` 2 | 3 | ***This is a bug fix release!*** 4 | 5 | Check out the [0.16.2 milestone](https://github.com/HubSpot/Singularity/issues?q=milestone%3A0.16.2+is%3Aclosed) to see pull requests in detail. 6 | 7 | ### Bug Fixes 8 | 9 | - [1605](https://github.com/HubSpot/Singularity/pull/1605) - Deploy IDs should allow '.' 10 | -------------------------------------------------------------------------------- /SingularityBase/src/main/java/com/hubspot/mesos/protos/MesosTaskState.java: -------------------------------------------------------------------------------- 1 | package com.hubspot.mesos.protos; 2 | 3 | public enum MesosTaskState { 4 | TASK_DROPPED, TASK_ERROR, TASK_FAILED, TASK_FINISHED, TASK_GONE, 5 | TASK_GONE_BY_OPERATOR, TASK_KILLED, TASK_KILLING, TASK_LOST, 6 | TASK_RUNNING, TASK_STAGING, TASK_STARTING, TASK_UNKNOWN, TASK_UNREACHABLE 7 | } 8 | -------------------------------------------------------------------------------- /scripts/logfetch/fake_section_head.py: -------------------------------------------------------------------------------- 1 | class FakeSectionHead(object): 2 | def __init__(self, fp): 3 | self.fp = fp 4 | self.sechead = '[Defaults]\n' 5 | 6 | def readline(self): 7 | if self.sechead: 8 | try: return self.sechead 9 | finally: self.sechead = None 10 | else: return self.fp.readline() 11 | 12 | -------------------------------------------------------------------------------- /SingularityUI/app/actions/ui/disasters.es6: -------------------------------------------------------------------------------- 1 | import { FetchDisabledActions, FetchDisastersData, FetchPriorityFreeze } from '../../actions/api/disasters'; 2 | 3 | export const refresh = () => (dispatch) => 4 | Promise.all([ 5 | dispatch(FetchDisabledActions.trigger()), 6 | dispatch(FetchDisastersData.trigger()), 7 | dispatch(FetchPriorityFreeze.trigger([404])), 8 | ]); 9 | -------------------------------------------------------------------------------- /SingularityBase/src/main/java/com/hubspot/mesos/SingularityVolumeSourceType.java: -------------------------------------------------------------------------------- 1 | package com.hubspot.mesos; 2 | 3 | import com.google.common.annotations.Beta; 4 | 5 | import io.swagger.v3.oas.annotations.media.Schema; 6 | 7 | @Beta 8 | @Schema 9 | public enum SingularityVolumeSourceType { 10 | UNKNOWN, DOCKER_VOLUME 11 | /*, SANDBOX_PATH, SECRET unimplemented */ 12 | } 13 | -------------------------------------------------------------------------------- /SingularityUI/app/styles/stylus/color-helpers.styl: -------------------------------------------------------------------------------- 1 | @import colors 2 | 3 | .color-warning 4 | color: $orange 5 | 6 | .color-success 7 | color: $green 8 | 9 | .color-error 10 | color: $red 11 | 12 | .color-paused 13 | color: $dark-yellow 14 | 15 | .color-grey 16 | color: $grey 17 | 18 | .color-info 19 | color: $blue-light 20 | 21 | .color-cleaning 22 | color: $purple -------------------------------------------------------------------------------- /Docs/releases/0.7.0.md: -------------------------------------------------------------------------------- 1 | ## Changes in `0.7.0` 2 | 3 | This release bumps Singularity’s Mesos dependency from version `0.23.0` to `0.28.1`. Check out the documentation [on the mesos site](http://mesos.apache.org/documentation/latest/upgrades/) for more information about upgrading your mesos cluster to `0.28.1`. 4 | 5 | [#994](https://github.com/HubSpot/Singularity/pull/994) - Upgrade mesos version to `0.28.1` -------------------------------------------------------------------------------- /SingularityBase/src/main/java/com/hubspot/singularity/HealthcheckMethod.java: -------------------------------------------------------------------------------- 1 | package com.hubspot.singularity; 2 | 3 | public enum HealthcheckMethod { 4 | 5 | GET("GET"), POST("POST"); 6 | 7 | private String method; 8 | 9 | private HealthcheckMethod(String method) { 10 | this.method = method; 11 | } 12 | 13 | public String getMethod() { 14 | return method; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /SingularityRunnerBase/src/main/java/com/hubspot/singularity/runner/base/shared/Signal.java: -------------------------------------------------------------------------------- 1 | package com.hubspot.singularity.runner.base.shared; 2 | 3 | public enum Signal { 4 | SIGTERM(15), SIGKILL(9), CHECK(0); 5 | 6 | private final int code; 7 | 8 | private Signal(int code) { 9 | this.code = code; 10 | } 11 | 12 | public int getCode() { 13 | return code; 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /SingularityUI/app/components/common/modal/ModalWrapper.es6: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export const getClickComponent = (component, doFirst = (() => Promise.resolve())) => ( 4 | React.Children.map(component.props.children, child => ( 5 | React.cloneElement(child, { 6 | onClick: () => doFirst().then(() => component.refs.modal.getWrappedInstance().show()) 7 | }) 8 | )) 9 | ); 10 | -------------------------------------------------------------------------------- /SingularityService/src/main/java/com/hubspot/singularity/data/transcoders/Transcoder.java: -------------------------------------------------------------------------------- 1 | package com.hubspot.singularity.data.transcoders; 2 | 3 | import javax.annotation.Nullable; 4 | 5 | public interface Transcoder { 6 | 7 | T fromBytes(@Nullable byte[] data) throws SingularityTranscoderException; 8 | 9 | byte[] toBytes(@Nullable T object) throws SingularityTranscoderException; 10 | 11 | } 12 | -------------------------------------------------------------------------------- /SingularityUI/SingularityTailer/test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Mocha 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SingularityUI/app/styles/stylus/charts.styl: -------------------------------------------------------------------------------- 1 | @import colors 2 | 3 | .chart__column 4 | width 100% 5 | height 300px 6 | 7 | .chart__data-point 8 | display block 9 | transition height 3s 10 | 11 | .chart__label 12 | vertical-align middle 13 | 14 | .chart__legend-fill 15 | display inline-block 16 | height 20px 17 | width 20px 18 | vertical-align middle 19 | margin-right 10px 20 | -------------------------------------------------------------------------------- /SingularityUI/app/actions/ui/form.es6: -------------------------------------------------------------------------------- 1 | export const ModifyField = (formId, fieldId, newValue) => ({ 2 | formId, 3 | fieldId, 4 | newValue, 5 | type: 'MODIFY_FORM_FIELD' 6 | }); 7 | 8 | export const ClearField = (formId, fieldId) => ({ 9 | formId, 10 | fieldId, 11 | type: 'CLEAR_FORM_FIELD' 12 | }); 13 | 14 | export const ClearForm = (formId) => ({ 15 | formId, 16 | type: 'CLEAR_FORM' 17 | }); 18 | -------------------------------------------------------------------------------- /SingularityUI/app/styles/scss/ui-table.scss: -------------------------------------------------------------------------------- 1 | table { 2 | th { 3 | &.sortable { 4 | cursor: pointer; 5 | } 6 | 7 | &.column-sorted { 8 | background: #f3f3f3; 9 | 10 | &.column-sorted-desc { 11 | 12 | } 13 | 14 | &.column-sorted-asc { 15 | 16 | } 17 | } 18 | } 19 | 20 | td { 21 | &.icon-column { 22 | width: 3em; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Docs/releases/0.6.2.md: -------------------------------------------------------------------------------- 1 | ## Changes in `0.6.2` 2 | 3 | This is a bug fix release. 4 | 5 | ### Bug Fixes 6 | 7 | - [#1078](https://github.com/HubSpot/Singularity/pull/1078) Typo: "Settingss" -> "Settings" on the Deploy form 8 | - [#1068](https://github.com/HubSpot/Singularity/pull/1068) Make sure to remove obsolete pending requests 9 | - [#975](https://github.com/HubSpot/Singularity/pull/975) Remove cleanup after bounce expire -------------------------------------------------------------------------------- /SingularityService/src/main/java/com/hubspot/singularity/auth/datastore/SingularityAuthDatastore.java: -------------------------------------------------------------------------------- 1 | package com.hubspot.singularity.auth.datastore; 2 | 3 | import java.util.Optional; 4 | 5 | import com.hubspot.singularity.SingularityUser; 6 | 7 | public interface SingularityAuthDatastore { 8 | Optional getUser(String username); 9 | com.google.common.base.Optional isHealthy(); 10 | } 11 | -------------------------------------------------------------------------------- /SingularityUI/app/actions/activeTasks.es6: -------------------------------------------------------------------------------- 1 | export function fetchTasksForRequest(requestId, state = 'active') { 2 | return $.ajax({url: `${ config.apiRoot }/history/request/${ requestId }/tasks/${ state }?${ $.param({property: 'taskId'}) }`}); 3 | } 4 | 5 | export function updateActiveTasks(requestId) { 6 | return dispatch => fetchTasksForRequest(requestId).done(tasks => dispatch({tasks, type: 'REQUEST_ACTIVE_TASKS'})); 7 | } 8 | -------------------------------------------------------------------------------- /SingularityUI/app/styles/stylus/vendorOverrides.styl: -------------------------------------------------------------------------------- 1 | ul 2 | &.messenger-theme-air 3 | -moz-user-select: all 4 | -webkit-user-select: all 5 | -o-user-select: all 6 | user-select: all 7 | 8 | .react-tagsinput 9 | border none 10 | padding 0 11 | 12 | .react-tagsinput-tag 13 | background-color #F2F9FC 14 | border-radius 2px 15 | border 1px solid darken(#F2F9FC, 25%) 16 | color darken(#F2F9FC, 70%) 17 | -------------------------------------------------------------------------------- /SingularityUI/SingularityTailer/src/components/index.js: -------------------------------------------------------------------------------- 1 | export { default as Log } from './Log'; 2 | export { default as connectToTailer } from './connectToTailer'; 3 | export { default as TailerProvider } from './TailerProvider'; 4 | export { default as SandboxTailer } from './SandboxTailer'; 5 | export { default as BlazarLogTailer } from './BlazarLogTailer'; 6 | export { default as DangerousLineRenderGroup } from './DangerousLineRenderGroup'; 7 | -------------------------------------------------------------------------------- /SingularityUI/app/components/common/formItems/ReduxSelect.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Select from 'react-select'; 3 | 4 | // Wrapper for react-select for use with redux form. Needs to override onBlur of react-select 5 | // More info: https://github.com/erikras/redux-form/issues/82 6 | export default (props) => { 7 | return ( 8 |