├── .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 |
12 | );
13 | };
14 |
--------------------------------------------------------------------------------
/SingularityUI/app/containers/ApiDocsContainer.jsx:
--------------------------------------------------------------------------------
1 | 'use es6';
2 |
3 | import React, { Component, PropTypes } from 'react';
4 | import { connect } from 'react-redux';
5 |
6 | import SwaggerUI from '../components/apidocs/SwaggerUI';
7 |
8 | class ApiDocsContainer extends Component {
9 | render() {
10 | return ;
11 | }
12 | }
13 |
14 | export default connect()(ApiDocsContainer);
--------------------------------------------------------------------------------
/Docs/releases/0.18.2.md:
--------------------------------------------------------------------------------
1 | ## Changes in `0.18.2`
2 |
3 | ***This is a bugfix release***
4 |
5 | Check out the [0.18.2 milestone](https://github.com/HubSpot/Singularity/milestone/34?closed=1) to see new features / bugfixes in detail.
6 |
7 | - [1671](https://github.com/HubSpot/Singularity/pull/1671) - Remove SingularityServiceBase module, no longer needed
8 | - [1674](https://github.com/HubSpot/Singularity/pull/1674) - Different order for ui build profile
9 |
--------------------------------------------------------------------------------
/SingularityService/src/main/java/com/hubspot/singularity/auth/authenticator/SingularityAuthenticator.java:
--------------------------------------------------------------------------------
1 | package com.hubspot.singularity.auth.authenticator;
2 |
3 | import java.util.Optional;
4 |
5 | import javax.ws.rs.container.ContainerRequestContext;
6 |
7 | import com.hubspot.singularity.SingularityUser;
8 |
9 | public interface SingularityAuthenticator {
10 | Optional getUser(ContainerRequestContext context);
11 | }
12 |
--------------------------------------------------------------------------------
/SingularityUI/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "parserOptions": {
3 | "sourceType": "module"
4 | },
5 | "plugins": [
6 | "react"
7 | ],
8 | "extends": "hubspot/experimental",
9 | "globals": {
10 | "$": true,
11 | "jQuery": true,
12 | "_": true,
13 | "config": true,
14 | "app": true,
15 | "Promise": true
16 | },
17 | "rules": {
18 | "id-length": [2, {"min": 3, "exceptions": ["_", "id", "ui", "s3"]}]
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/publish_gitbook.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | gitbook install
6 | gitbook build
7 | cp SingularityUI/app/assets/static/images/favicon.ico _book/gitbook/images/favicon.ico
8 | cd _book
9 | echo 'getsingularity.com' > CNAME
10 | rm -rf Docs/releases/*.md
11 | rm -rf README.md
12 | git init
13 | git add .
14 | git commit -m "update gitbook from master branch docs"
15 | git push --force --quiet git@github.com:HubSpot/Singularity.git master:gh-pages
16 |
--------------------------------------------------------------------------------
/SingularityUI/app/actions/ui/racks.es6:
--------------------------------------------------------------------------------
1 | import { DecommissionRack, RemoveRack, ReactivateRack, FetchRacks } from '../../actions/api/racks';
2 |
3 | export const refresh = () => (dispatch) =>
4 | dispatch(FetchRacks.trigger());
5 |
6 | export const initialize = () => (dispatch) =>
7 | Promise.all([
8 | dispatch(DecommissionRack.clear()),
9 | dispatch(RemoveRack.clear()),
10 | dispatch(ReactivateRack.clear()),
11 | dispatch(refresh()),
12 | ]);
13 |
--------------------------------------------------------------------------------
/SingularityUI/app/reducers/activeRequest.es6:
--------------------------------------------------------------------------------
1 | const ACTIONS = {
2 | LOG_INIT(state, {requestId}) {
3 | return Object.assign({}, state, {requestId});
4 | },
5 | REQUEST_ACTIVE_TASKS(state, {tasks}) {
6 | return Object.assign({}, state, {activeTasks: tasks});
7 | }
8 | };
9 |
10 | export default function(state = {}, action) {
11 | if (action.type in ACTIONS) {
12 | return ACTIONS[action.type](state, action);
13 | }
14 | return state;
15 | }
16 |
--------------------------------------------------------------------------------
/SingularityUI/app/styles/stylus/layout.styl:
--------------------------------------------------------------------------------
1 | @import colors
2 |
3 | .border-color-light-gray
4 | border-color: $grey-light
5 |
6 | @media (min-width: 992px)
7 | .col-md-1-5
8 | width: 20%
9 |
10 | .childItem
11 | margin-left: 10px
12 |
13 | .page
14 | padding 0 20px 50px 20px
15 |
16 | .page, .navbar .container-fluid {
17 | max-width: 1500px;
18 | }
19 |
20 | .tab-container
21 | padding-top: 25px;
22 |
23 | .page
24 | padding: 0
25 |
--------------------------------------------------------------------------------
/Docs/about/adopters.md:
--------------------------------------------------------------------------------
1 | # Adopters
2 |
3 | These organizations proudly use Singularity:
4 |
5 | - [HubSpot](http://www.hubspot.com/)
6 | - [Groupon](http://www.groupon.com/)
7 | - [OpenTable](http://www.opentable.com/)
8 | - [EverTrue](http://www.evertrue.com/)
9 | - [Grepsr](http://www.grepsr.com/)
10 | - [Nitro](http://www.gonitro.com/)
11 | - [Bdmreco](https://bdmreco.io/)
12 |
13 | If you're using Singularity and aren't on this list, feel free to submit a Pull Request.
14 |
--------------------------------------------------------------------------------
/SingularityClient/src/main/java/com/hubspot/singularity/client/ProviderUtils.java:
--------------------------------------------------------------------------------
1 | package com.hubspot.singularity.client;
2 |
3 | import javax.inject.Provider;
4 |
5 | class ProviderUtils
6 | {
7 | public static Provider of(final T instance) { // XXX: this seems like it should be in a base library somewhere?
8 | return new Provider() {
9 | @Override
10 | public T get()
11 | {
12 | return instance;
13 | }
14 | };
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/SingularityRunnerBase/src/main/java/com/hubspot/singularity/runner/base/shared/ExceptionChainParser.java:
--------------------------------------------------------------------------------
1 | package com.hubspot.singularity.runner.base.shared;
2 |
3 | public class ExceptionChainParser {
4 | public static boolean exceptionChainContains(Exception e, Class clazz) {
5 | Throwable cause = e;
6 | while (null != (cause = cause.getCause())) {
7 | if (clazz.isInstance(cause)) {
8 | return true;
9 | }
10 | }
11 | return false;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/SingularityUI/SingularityTailer/example/LoadTests.js:
--------------------------------------------------------------------------------
1 | import React, { Component, PropTypes } from 'react';
2 |
3 | class LoadTests extends Component {
4 | componentDidMount() {
5 | require.ensure([], (require) => {
6 | require('../test/index.test');
7 | });
8 | }
9 |
10 | render() {
11 | return (
12 |
13 | );
14 | }
15 | }
16 |
17 | LoadTests.propTypes = {
18 | params: PropTypes.object.isRequired
19 | };
20 |
21 | export default LoadTests;
22 |
--------------------------------------------------------------------------------
/SingularityUI/app/actions/ui/globalSearch.es6:
--------------------------------------------------------------------------------
1 | export const TOGGLE_VISIBILITY = 'TOGGLE_VISIBILITY';
2 | export const SET_VISIBILITY = 'SET_VISIBILITY';
3 |
4 | export const ToggleVisibility = () => {
5 | return (dispatch) => {
6 | dispatch({
7 | type: TOGGLE_VISIBILITY
8 | });
9 | };
10 | };
11 |
12 | export const SetVisibility = (visible) => {
13 | return (dispatch) => {
14 | dispatch({
15 | type: SET_VISIBILITY,
16 | value: visible
17 | });
18 | };
19 | };
--------------------------------------------------------------------------------
/SingularityRunnerBase/src/main/java/com/hubspot/singularity/runner/base/shared/ProcessFailedException.java:
--------------------------------------------------------------------------------
1 | package com.hubspot.singularity.runner.base.shared;
2 |
3 | public class ProcessFailedException extends Exception {
4 |
5 | private static final long serialVersionUID = 1L;
6 |
7 | public ProcessFailedException(String message) {
8 | super(message);
9 | }
10 |
11 | public ProcessFailedException(String message, Throwable cause) {
12 | super(message, cause);
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/SingularityBase/src/main/java/com/hubspot/singularity/SingularityDeployFailureReason.java:
--------------------------------------------------------------------------------
1 | package com.hubspot.singularity;
2 |
3 | import io.swagger.v3.oas.annotations.media.Schema;
4 |
5 | @Schema
6 | public enum SingularityDeployFailureReason {
7 | TASK_FAILED_ON_STARTUP, TASK_FAILED_HEALTH_CHECKS, TASK_COULD_NOT_BE_SCHEDULED, TASK_NEVER_ENTERED_RUNNING, TASK_EXPECTED_RUNNING_FINISHED,
8 | DEPLOY_CANCELLED, DEPLOY_OVERDUE, FAILED_TO_SAVE_DEPLOY_STATE, LOAD_BALANCER_UPDATE_FAILED, PENDING_DEPLOY_REMOVED
9 | }
10 |
--------------------------------------------------------------------------------
/SingularityUI/app/actions/ui/newDeployForm.es6:
--------------------------------------------------------------------------------
1 | import { FetchRequest } from '../../actions/api/requests';
2 | import { ClearForm } from '../../actions/ui/form';
3 |
4 | export const refresh = (requestId, formId) => (dispatch, getState) => {
5 | const promises = [];
6 | promises.push(dispatch(FetchRequest.trigger(requestId, true)));
7 |
8 | const form = getState().ui.form[formId];
9 |
10 | if (!form) {
11 | promises.push(dispatch(ClearForm(formId)));
12 | }
13 |
14 | return Promise.all(promises);
15 | };
16 |
--------------------------------------------------------------------------------
/SingularityBase/src/main/java/com/hubspot/singularity/HealthcheckProtocol.java:
--------------------------------------------------------------------------------
1 | package com.hubspot.singularity;
2 |
3 | import io.swagger.v3.oas.annotations.media.Schema;
4 |
5 | @Schema
6 | public enum HealthcheckProtocol {
7 |
8 | HTTP("http"), HTTPS("https"), HTTP2("http"), HTTPS2("https");
9 |
10 | private final String protocol;
11 |
12 | private HealthcheckProtocol(String protocol) {
13 | this.protocol = protocol;
14 | }
15 |
16 | public String getProtocol() {
17 | return protocol;
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/SingularityRunnerBase/src/main/java/com/hubspot/singularity/runner/base/configuration/Configuration.java:
--------------------------------------------------------------------------------
1 | package com.hubspot.singularity.runner.base.configuration;
2 |
3 | import static java.lang.annotation.ElementType.TYPE;
4 | import static java.lang.annotation.RetentionPolicy.RUNTIME;
5 |
6 | import java.lang.annotation.Retention;
7 | import java.lang.annotation.Target;
8 |
9 | @Target({ TYPE })
10 | @Retention(RUNTIME)
11 | public @interface Configuration {
12 | String filename();
13 | String consolidatedField();
14 | }
15 |
--------------------------------------------------------------------------------
/SingularityService/src/main/java/com/hubspot/singularity/SingularityAsyncHttpClient.java:
--------------------------------------------------------------------------------
1 | package com.hubspot.singularity;
2 |
3 | import javax.inject.Inject;
4 |
5 | import com.ning.http.client.AsyncHttpClient;
6 | import com.ning.http.client.AsyncHttpClientConfig;
7 |
8 | public class SingularityAsyncHttpClient extends AsyncHttpClient {
9 |
10 | public SingularityAsyncHttpClient(AsyncHttpClientConfig clientConfig) {
11 | super(clientConfig);
12 | }
13 |
14 | @Inject
15 | public SingularityAsyncHttpClient() {}
16 | }
17 |
--------------------------------------------------------------------------------
/SingularityService/src/main/java/com/hubspot/singularity/auth/SingularityAuthParamInjectionResolver.java:
--------------------------------------------------------------------------------
1 | package com.hubspot.singularity.auth;
2 |
3 | import org.glassfish.jersey.server.internal.inject.ParamInjectionResolver;
4 |
5 | import com.google.inject.Singleton;
6 |
7 | import io.dropwizard.auth.Auth;
8 |
9 | @Singleton
10 | public class SingularityAuthParamInjectionResolver extends ParamInjectionResolver {
11 | public SingularityAuthParamInjectionResolver() {
12 | super(SingularityAuthFactoryProvider.class);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/SingularityUI/app/actions/api/sandbox.es6:
--------------------------------------------------------------------------------
1 | import { buildApiAction } from './base';
2 |
3 | export const FetchTaskFiles = buildApiAction(
4 | 'FETCH_TASK_FILES',
5 | (taskId, path = undefined, catchStatusCodes = null) => {
6 | let url;
7 | if (!_.isUndefined(path)) {
8 | url = `/sandbox/${taskId}/browse?path=${path}`
9 | } else {
10 | url = `/sandbox/${taskId}/browse`
11 | }
12 | return {
13 | url: url,
14 | catchStatusCodes
15 | }
16 | },
17 | (taskId, path = '') => `${taskId}/${path}`
18 | );
19 |
--------------------------------------------------------------------------------
/SingularityUI/app/reducers/ui/globalSearch.es6:
--------------------------------------------------------------------------------
1 | import * as GlobalSearchActions from '../../actions/ui/globalSearch';
2 |
3 | const initialState = {
4 | visible: false
5 | };
6 |
7 | export default (state = initialState, action) => {
8 | switch (action.type) {
9 | case GlobalSearchActions.TOGGLE_VISIBILITY:
10 | return {
11 | visible: !state.visible
12 | };
13 | case GlobalSearchActions.SET_VISIBILITY:
14 | return {
15 | visible: action.value
16 | };
17 | default:
18 | return state;
19 | }
20 | };
21 |
--------------------------------------------------------------------------------
/Docs/releases/0.7.1.md:
--------------------------------------------------------------------------------
1 | ## Changes in `0.7.1`
2 |
3 | This is a bug fix release.
4 |
5 | Check out the [0.7.1 milestone](https://github.com/HubSpot/Singularity/issues?q=milestone%3A0.7.1+is%3Aclosed) to see bugfixes in detail.
6 |
7 | - [#1034](https://github.com/HubSpot/Singularity/pull/1034) Change package.json 'vex' dependency to 'vex-js'
8 | - [#1049](https://github.com/HubSpot/Singularity/pull/1049) Don't set shell if arguments list is empty, ability to override shell
9 | - [#1050](https://github.com/HubSpot/Singularity/pull/1050) Add polyfills for Object.assign and Promise
--------------------------------------------------------------------------------
/SingularityUI/SingularityTailer/src/components/DangerousLineRenderGroup.js:
--------------------------------------------------------------------------------
1 | import React, { PropTypes } from 'react';
2 | import { renderToStaticMarkup } from 'react-dom/server';
3 | import LineRenderGroup from './LineRenderGroup';
4 |
5 | class DangerousLineRenderGroup extends LineRenderGroup {
6 | render() {
7 | const lineGroupHTML = renderToStaticMarkup(super.render());
8 |
9 | return (
10 |
13 | );
14 | }
15 | }
16 |
17 | export default DangerousLineRenderGroup;
18 |
--------------------------------------------------------------------------------
/SingularityUI/app/actions/api/users.es6:
--------------------------------------------------------------------------------
1 | import { buildApiAction, buildJsonApiAction } from './base';
2 |
3 | export const AddStarredRequests = buildJsonApiAction(
4 | 'ADD_STARRED_REQUESTS',
5 | 'POST',
6 | (starredRequestIds) => ({
7 | url: '/users/settings/starred-requests',
8 | body: { starredRequestIds }
9 | })
10 | );
11 |
12 | export const DeleteStarredRequests = buildJsonApiAction(
13 | 'DELETE_STARRED_REQUESTS',
14 | 'DELETE',
15 | (starredRequestIds) => ({
16 | url: '/users/settings/starred-requests',
17 | body: { starredRequestIds }
18 | })
19 | );
--------------------------------------------------------------------------------
/SingularityBase/src/main/java/com/hubspot/singularity/RequestState.java:
--------------------------------------------------------------------------------
1 | package com.hubspot.singularity;
2 |
3 | import io.swagger.v3.oas.annotations.media.Schema;
4 |
5 | @Schema
6 | public enum RequestState {
7 |
8 | ACTIVE(true), DELETING(false), DELETED(false), PAUSED(false), SYSTEM_COOLDOWN(true), FINISHED(false), DEPLOYING_TO_UNPAUSE(true);
9 |
10 | private final boolean isRunnable;
11 |
12 | private RequestState(boolean isRunnable) {
13 | this.isRunnable = isRunnable;
14 | }
15 |
16 | public boolean isRunnable() {
17 | return isRunnable;
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/SingularityRunnerBase/src/main/java/com/hubspot/singularity/runner/base/jackson/Obfuscate.java:
--------------------------------------------------------------------------------
1 | package com.hubspot.singularity.runner.base.jackson;
2 |
3 | import static java.lang.annotation.ElementType.FIELD;
4 | import static java.lang.annotation.ElementType.METHOD;
5 | import static java.lang.annotation.ElementType.PARAMETER;
6 | import static java.lang.annotation.RetentionPolicy.RUNTIME;
7 |
8 | import java.lang.annotation.Retention;
9 | import java.lang.annotation.Target;
10 |
11 | @Target({ METHOD, FIELD, PARAMETER })
12 | @Retention(RUNTIME)
13 | public @interface Obfuscate {
14 | }
15 |
--------------------------------------------------------------------------------
/SingularityService/src/main/java/com/hubspot/singularity/config/NetworkConfiguration.java:
--------------------------------------------------------------------------------
1 | package com.hubspot.singularity.config;
2 |
3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4 |
5 | @JsonIgnoreProperties( ignoreUnknown = true )
6 | public class NetworkConfiguration {
7 | private boolean defaultPortMapping;
8 |
9 | public void setDefaultPortMapping(boolean defaultPortMapping)
10 | {
11 | this.defaultPortMapping = defaultPortMapping;
12 | }
13 |
14 | public boolean isDefaultPortMapping()
15 | {
16 | return defaultPortMapping;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/SingularityUI/SingularityTailer/example/AppRouter.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Router, Route, browserHistory } from 'react-router';
3 |
4 | import App from './App';
5 | import SandboxTailerPage from './SandboxTailerPage';
6 | import LoadTests from './LoadTests';
7 |
8 | const AppRouter = () => (
9 |
10 |
11 |
12 |
13 |
14 |
15 | );
16 |
17 | export default AppRouter;
18 |
--------------------------------------------------------------------------------
/SingularityS3Base/src/main/java/com/hubspot/singularity/s3/base/CacheCheck.java:
--------------------------------------------------------------------------------
1 | package com.hubspot.singularity.s3.base;
2 |
3 | public class CacheCheck {
4 | private final CacheCheckResult cacheCheckResult;
5 | private final String message;
6 |
7 | public CacheCheck(CacheCheckResult cacheCheckResult, String message) {
8 | this.cacheCheckResult = cacheCheckResult;
9 | this.message = message;
10 | }
11 |
12 | public CacheCheckResult getCacheCheckResult() {
13 | return cacheCheckResult;
14 | }
15 |
16 | public String getMessage() {
17 | return message;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Docs/releases/0.6.1.md:
--------------------------------------------------------------------------------
1 | ## Changes in `0.6.1`
2 |
3 | This is a bug fix release.
4 |
5 | Check out the [0.7.1 milestone](https://github.com/HubSpot/Singularity/issues?q=milestone%3A0.7.1+is%3Aclosed) to see bugfixes in detail. (Changes for 0.6.1 are the same as 0.7.1)
6 |
7 | - [#1034](https://github.com/HubSpot/Singularity/pull/1034) Change package.json 'vex' dependency to 'vex-js'
8 | - [#1049](https://github.com/HubSpot/Singularity/pull/1049) Don't set shell if arguments list is empty, ability to override shell
9 | - [#1050](https://github.com/HubSpot/Singularity/pull/1050) Add polyfills for Object.assign and Promise
--------------------------------------------------------------------------------
/SingularityService/src/main/java/com/hubspot/singularity/event/SingularityEventSender.java:
--------------------------------------------------------------------------------
1 | package com.hubspot.singularity.event;
2 |
3 | import com.hubspot.singularity.SingularityDeployUpdate;
4 | import com.hubspot.singularity.SingularityRequestHistory;
5 | import com.hubspot.singularity.SingularityTaskWebhook;
6 |
7 | public interface SingularityEventSender {
8 | void requestHistoryEvent(SingularityRequestHistory singularityRequestHistory);
9 |
10 | void taskWebhookEvent(SingularityTaskWebhook taskWebhook);
11 |
12 | void deployHistoryEvent(SingularityDeployUpdate singularityDeployUpdate);
13 | }
14 |
--------------------------------------------------------------------------------
/SingularityUI/app/actions/api/webhooks.es6:
--------------------------------------------------------------------------------
1 | import { buildApiAction, buildJsonApiAction } from './base';
2 |
3 | export const FetchWebhooks = buildApiAction(
4 | 'FETCH_WEBHOOKS',
5 | {url: '/webhooks/summary'}
6 | );
7 |
8 | export const DeleteWebhook = buildJsonApiAction(
9 | 'DELETE_WEBHOOK',
10 | 'DELETE',
11 | (webhookId) => ({
12 | url: `/webhooks/?webhookId=${ webhookId }`
13 | })
14 | );
15 |
16 | export const NewWebhook = buildJsonApiAction(
17 | 'NEW_WEBHOOK',
18 | 'POST',
19 | (uri, type, user) => ({
20 | url: '/webhooks',
21 | body: { uri, type, user }
22 | })
23 | );
24 |
--------------------------------------------------------------------------------
/scripts/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright 2015 HubSpot, Inc
2 |
3 | Licensed under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 |
7 | http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 |
--------------------------------------------------------------------------------
/SingularityBase/src/main/java/com/hubspot/singularity/SingularityDisasterType.java:
--------------------------------------------------------------------------------
1 | package com.hubspot.singularity;
2 |
3 | import io.swagger.v3.oas.annotations.media.Schema;
4 |
5 | @Schema
6 | public enum SingularityDisasterType {
7 | EXCESSIVE_TASK_LAG(true), LOST_SLAVES(false), LOST_TASKS(false), USER_INITIATED(false);
8 |
9 | private boolean automaticallyClearable;
10 |
11 | SingularityDisasterType(boolean automaticallyClearable) {
12 | this.automaticallyClearable = automaticallyClearable;
13 | }
14 |
15 | public boolean isAutomaticallyClearable() {
16 | return automaticallyClearable;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/SingularityService/src/main/java/com/hubspot/singularity/event/SingularityEventListener.java:
--------------------------------------------------------------------------------
1 | package com.hubspot.singularity.event;
2 |
3 | import com.hubspot.singularity.SingularityDeployUpdate;
4 | import com.hubspot.singularity.SingularityRequestHistory;
5 | import com.hubspot.singularity.SingularityTaskWebhook;
6 |
7 | public interface SingularityEventListener {
8 | void requestHistoryEvent(SingularityRequestHistory singularityRequestHistory);
9 |
10 | void taskHistoryUpdateEvent(SingularityTaskWebhook singularityTaskWebhook);
11 |
12 | void deployHistoryEvent(SingularityDeployUpdate singularityDeployUpdate);
13 | }
14 |
--------------------------------------------------------------------------------
/SingularityUI/app/assets/static/images/icons/icon-run_once.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
--------------------------------------------------------------------------------
/SingularityUI/app/styles/stylus/searchInput.styl:
--------------------------------------------------------------------------------
1 | input.big-search-box
2 | height 50px
3 | line-height 50px
4 | border 0
5 | font-size 20px
6 | font-family inherit
7 | padding 0 10px !important
8 | margin 0
9 | color inherit
10 | opacity .5
11 | background rgba(0, 0, 0, .1)
12 | margin-bottom 4px
13 | width 100%
14 | display block
15 | font-weight bold
16 |
17 | &::-webkit-search-cancel-button:after
18 | line-height 1.8rem
19 | font-weight normal
20 |
21 | &:focus
22 | background rgba(0, 0, 0, .05)
23 | opacity 1
24 | outline none
25 |
--------------------------------------------------------------------------------
/SingularityRunnerBase/src/main/java/com/hubspot/singularity/runner/base/shared/CompressionType.java:
--------------------------------------------------------------------------------
1 | package com.hubspot.singularity.runner.base.shared;
2 |
3 | public enum CompressionType {
4 | GZIP("gzip", ".gz"), BZIP2("bzip2", ".bz2"), BGZIP("bgzip", ".gz");
5 |
6 | private final String command;
7 | private final String extention;
8 |
9 | CompressionType(String command, String extention) {
10 | this.command = command;
11 | this.extention = extention;
12 | }
13 |
14 | public String getCommand() {
15 | return command;
16 | }
17 |
18 | public String getExtention() {
19 | return extention;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Docs/releases/0.18.1.md:
--------------------------------------------------------------------------------
1 | ## Changes in `0.18.1`
2 |
3 | ***This is a bugfix release***
4 |
5 | Check out the [0.18.1 milestone](https://github.com/HubSpot/Singularity/milestone/33?closed=1) to see bugfixes in detail.
6 |
7 | - [1663](https://github.com/HubSpot/Singularity/pull/1663) - Reimplement getPortByIndex in SingularityTask
8 | - [1664](https://github.com/HubSpot/Singularity/pull/1664) - Add REASON_AGENT status update reasons
9 | - [1661](https://github.com/HubSpot/Singularity/pull/1661) - Enable auth headers in old tailer
10 | - [1655](https://github.com/HubSpot/Singularity/pull/1655) - Easier setup for local dev with SingularityService
11 |
--------------------------------------------------------------------------------
/SingularityS3Uploader/src/main/java/com/hubspot/singularity/s3uploader/UploaderFileAttributes.java:
--------------------------------------------------------------------------------
1 | package com.hubspot.singularity.s3uploader;
2 |
3 | import com.google.common.base.Optional;
4 |
5 | public class UploaderFileAttributes {
6 | Optional startTime;
7 | Optional endTime;
8 |
9 | public UploaderFileAttributes(Optional startTime, Optional endTime) {
10 | this.startTime = startTime;
11 | this.endTime = endTime;
12 | }
13 |
14 | public Optional getStartTime() {
15 | return startTime;
16 | }
17 |
18 | public Optional getEndTime() {
19 | return endTime;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/SingularityService/src/main/java/com/hubspot/singularity/smtp/SMTPAuthenticator.java:
--------------------------------------------------------------------------------
1 | package com.hubspot.singularity.smtp;
2 |
3 | import javax.mail.Authenticator;
4 | import javax.mail.PasswordAuthentication;
5 |
6 | public class SMTPAuthenticator extends Authenticator {
7 | private final PasswordAuthentication passwordAuthentication;
8 |
9 | public SMTPAuthenticator(String username, String password) {
10 | this.passwordAuthentication = new PasswordAuthentication(username, password);
11 | }
12 |
13 | @Override
14 | protected PasswordAuthentication getPasswordAuthentication() {
15 | return passwordAuthentication;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/SingularityService/src/main/java/com/hubspot/singularity/jersey/SingularityJerseyModule.java:
--------------------------------------------------------------------------------
1 | package com.hubspot.singularity.jersey;
2 |
3 | import static com.hubspot.singularity.jersey.JerseyBinder.bindContainerRequestFilter;
4 |
5 | import com.google.inject.Binder;
6 | import com.google.inject.Module;
7 | import com.google.inject.Scopes;
8 |
9 | /**
10 | * Jersey specific code for Singularity.
11 | */
12 | public class SingularityJerseyModule implements Module
13 | {
14 | @Override
15 | public void configure(final Binder binder)
16 | {
17 | bindContainerRequestFilter(binder).to(ReplaceES419LanguageFilter.class).in(Scopes.SINGLETON);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/SingularityUI/SingularityTailer/src/components/connectToTailer.js:
--------------------------------------------------------------------------------
1 | import React, { Component, PropTypes } from 'react';
2 |
3 | const connectToTailer = (Wrapped) => {
4 | class TailerConnection extends Component {
5 | constructor(props, context) {
6 | super(props, context);
7 |
8 | this.getTailerState = context.getTailerState;
9 | }
10 |
11 | render() {
12 | return ;
13 | }
14 | }
15 |
16 | TailerConnection.contextTypes = {
17 | getTailerState: PropTypes.func
18 | };
19 |
20 | return TailerConnection;
21 | };
22 |
23 | export default connectToTailer;
24 |
--------------------------------------------------------------------------------
/Docs/releases/0.4.7.md:
--------------------------------------------------------------------------------
1 | ## Changes in `0.4.7`
2 |
3 | Check out the [0.4.7 milestone](https://github.com/HubSpot/Singularity/issues?q=milestone%3A0.4.7+is%3Aclosed) to see new features / bugfixes in detail.
4 |
5 | ### Fixed
6 | - When the [0.4.6 release](https://github.com/HubSpot/Singularity/releases/tag/Singularity-0.4.6) was built, the static assets for the Web UI weren't properly packaged in the JAR. This is now fixed in 0.4.7.
7 |
8 | ### Improvements
9 | - [#777](https://github.com/HubSpot/Singularity/pull/777) - Properly sort requests in the Web UI
10 | - [#820](https://github.com/HubSpot/Singularity/pull/820) - Web UI gives blank page after first deploy
11 |
--------------------------------------------------------------------------------
/Docs/releases/0.4.11.md:
--------------------------------------------------------------------------------
1 | ## Changes in `0.4.11`
2 |
3 | Check out the [0.4.11 milestone](https://github.com/HubSpot/Singularity/issues?q=milestone%3A0.4.11+is%3Aclosed) to see new features / bugfixes in detail.
4 |
5 | ### Improvements
6 | - [#915](https://github.com/HubSpot/Singularity/pull/915) Add mailhog to integration test environment
7 | - [#908](https://github.com/HubSpot/Singularity/pull/908) Better sorting with fuzzy search
8 | - [#907](https://github.com/HubSpot/Singularity/pull/907) Make SingularityExecutor handle docker volumes when hostPath is absent
9 | - [#900](https://github.com/HubSpot/Singularity/pull/900) Store status update reason field in SingularityTaskHistoryUpdate
--------------------------------------------------------------------------------
/SingularityUI/app/reducers/api/keyed.es6:
--------------------------------------------------------------------------------
1 | import buildApiActionReducer from './base';
2 |
3 | export default function buildKeyedApiActionReducer(ActionGroup, ...args) {
4 | const baseReducer = buildApiActionReducer(ActionGroup, ...args);
5 |
6 | return function reducer(state = {}, action) {
7 | if (action.type === ActionGroup.CLEAR) {
8 | return {};
9 | } else if (_.contains([ActionGroup.ERROR, ActionGroup.SUCCESS, ActionGroup.STARTED], action.type)) {
10 | const newState = {};
11 | newState[action.key] = baseReducer(state[action.key], action);
12 | return _.extend({}, state, newState);
13 | }
14 | return state;
15 | };
16 | }
17 |
--------------------------------------------------------------------------------
/SingularityUI/app/styles/stylus/dashboard.styl:
--------------------------------------------------------------------------------
1 | .request-summary, .request-summary .panel
2 | margin-bottom: 0
3 |
4 | .request-summary .row
5 | margin-bottom: 5px
6 |
7 | .request-summary .request-state
8 | padding 4px .8em
9 | line-height 27px
10 | border-radius 4px
11 | background #f3f3f3
12 | color #888
13 | margin-right .5em
14 |
15 | &[data-state='ACTIVE']
16 | color #519D3D
17 |
18 | &[data-state='PAUSED']
19 | color #3374CD
20 |
21 | &[data-state='SYSTEM_COOLDOWN']
22 | color #BF5D36
23 |
24 | &[data-state='DELETED']
25 | color #ff0000
26 |
27 | &:empty
28 | display none
29 |
--------------------------------------------------------------------------------
/SingularityRunnerBase/src/main/java/com/hubspot/singularity/runner/base/jackson/ObfuscateModule.java:
--------------------------------------------------------------------------------
1 | package com.hubspot.singularity.runner.base.jackson;
2 |
3 | import com.fasterxml.jackson.core.Version;
4 | import com.fasterxml.jackson.databind.Module;
5 |
6 | public class ObfuscateModule extends Module {
7 | @Override
8 | public String getModuleName() {
9 | return "ObfuscateModule";
10 | }
11 |
12 | @Override
13 | public Version version() {
14 | return Version.unknownVersion();
15 | }
16 |
17 | @Override
18 | public void setupModule(SetupContext context) {
19 | context.appendAnnotationIntrospector(new ObfuscateAnnotationIntrospector());
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/SingularityS3Uploader/src/main/java/com/hubspot/singularity/s3uploader/config/SingularityS3UploaderModule.java:
--------------------------------------------------------------------------------
1 | package com.hubspot.singularity.s3uploader.config;
2 |
3 | import com.google.inject.AbstractModule;
4 | import com.hubspot.singularity.runner.base.shared.SingularityDriver;
5 | import com.hubspot.singularity.s3.base.SingularityS3BaseModule;
6 | import com.hubspot.singularity.s3uploader.SingularityS3UploaderDriver;
7 |
8 | public class SingularityS3UploaderModule extends AbstractModule {
9 | @Override
10 | protected void configure() {
11 | install(new SingularityS3BaseModule());
12 | bind(SingularityDriver.class).to(SingularityS3UploaderDriver.class);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/SingularityUI/app/components/logs/LoadingSpinner.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import classNames from 'classnames';
3 |
4 | function LoadingSpinner(props) {
5 | let className = classNames({
6 | 'page-loader': true,
7 | centered: props.centered
8 | });
9 |
10 | if (props.children.length > 0) {
11 | return ;
12 | }
13 | return ;
14 | }
15 |
16 | LoadingSpinner.propTypes = {
17 | text: React.PropTypes.string,
18 | centered: React.PropTypes.bool,
19 | children: React.PropTypes.node
20 | };
21 |
22 | export default LoadingSpinner;
23 |
24 |
--------------------------------------------------------------------------------
/SingularityService/src/main/java/com/hubspot/singularity/config/UIQuickLinkConfiguration.java:
--------------------------------------------------------------------------------
1 | package com.hubspot.singularity.config;
2 |
3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4 |
5 | @JsonIgnoreProperties( ignoreUnknown = true )
6 | public class UIQuickLinkConfiguration {
7 | private String template;
8 | private String title;
9 |
10 | public String getTemplate() {
11 | return template;
12 | }
13 |
14 | public void setTemplate(String template) {
15 | this.template = template;
16 | }
17 |
18 | public String getTitle() {
19 | return title;
20 | }
21 |
22 | public void setTitle(String title) {
23 | this.title = title;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/SingularityService/src/main/java/com/hubspot/singularity/helpers/SingularityMesosTaskHolder.java:
--------------------------------------------------------------------------------
1 | package com.hubspot.singularity.helpers;
2 |
3 | import org.apache.mesos.v1.Protos.TaskInfo;
4 |
5 | import com.hubspot.singularity.SingularityTask;
6 |
7 | public class SingularityMesosTaskHolder {
8 | private final SingularityTask task;
9 | private final TaskInfo mesosTask;
10 |
11 | public SingularityMesosTaskHolder(SingularityTask task, TaskInfo mesosTask) {
12 | this.task = task;
13 | this.mesosTask = mesosTask;
14 | }
15 |
16 | public SingularityTask getTask() {
17 | return task;
18 | }
19 |
20 | public TaskInfo getMesosTask() {
21 | return mesosTask;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/SingularityUI/app/components/logs/Footer.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { connect } from 'react-redux';
3 | import Utils from '../../utils';
4 |
5 | const Footer = ({filename, bytesTotal, bytesLoaded}) => ({filename} ({Utils.humanizeFileSize(bytesTotal)} total, {Utils.humanizeFileSize(bytesLoaded)} loaded)
);
6 |
7 | export default connect((state, ownProps) => {
8 | return {
9 | filename: Utils.fileName(ownProps.tailerId),
10 | bytesTotal: Utils.maybe(state.tailer.files, [ownProps.tailerId, 'fileSize'], 0),
11 | bytesLoaded: Utils.maybe(state.tailer.files, [ownProps.tailerId, 'chunks'], []).map(({byteLength}) => byteLength).reduce((a, b) => a + b, 0)
12 | };
13 | })(Footer);
--------------------------------------------------------------------------------
/SingularityUI/app/actions/ui/requestForm.es6:
--------------------------------------------------------------------------------
1 | import { ModifyField, ClearForm } from '../../actions/ui/form';
2 | import { FetchRacks } from '../../actions/api/racks';
3 | import { SaveRequest, FetchRequest } from '../../actions/api/requests';
4 |
5 | export const refresh = (requestId, formId) => (dispatch) => {
6 | const promises = []
7 |
8 | promises.push(dispatch(FetchRacks.trigger()));
9 |
10 | if (requestId) {
11 | promises.push(dispatch(FetchRequest.trigger(requestId)));
12 | } else {
13 | promises.push(dispatch(FetchRequest.clearData()));
14 | }
15 |
16 | promises.push(dispatch(SaveRequest.clearData()));
17 | promises.push(dispatch(ClearForm(formId)));
18 |
19 | return Promise.all(promises);
20 | };
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | _book
2 | *.orig
3 | target
4 | .DS_Store
5 | .classpath
6 | .settings
7 | target-eclipse
8 | .project
9 | .pydevproject
10 | bin
11 | *~
12 | JavaConsole.java
13 | .checkstyle
14 | *.iml
15 | .idea
16 | *.pyc
17 | __pycache__
18 | local_singularity*yml
19 | qa_singularity.yml
20 | Docs/_build
21 | SingularityUI/npm-debug.log
22 | SingularityUI/node_modules/*
23 | SingularityUI/bower_components/*
24 | SingularityUI/brunchlog
25 | SingularityUI/app/env.coffee
26 |
27 | node_modules/*
28 | .vagrant
29 | vagrant/Berksfile.lock
30 | SingularityUI/.vee
31 |
32 | scripts/*.log
33 | scripts/*.gz
34 | scripts/singularity_logfetch.egg-info
35 | scripts/build
36 | scripts/dist
37 | scripts/.venv
38 |
39 | .pmdruleset.xml
40 |
--------------------------------------------------------------------------------
/SingularityService/src/main/java/com/hubspot/singularity/auth/authenticator/SingularityDisabledAuthenticator.java:
--------------------------------------------------------------------------------
1 | package com.hubspot.singularity.auth.authenticator;
2 |
3 | import java.util.Optional;
4 |
5 | import javax.ws.rs.container.ContainerRequestContext;
6 |
7 | import com.google.inject.Inject;
8 | import com.google.inject.Singleton;
9 | import com.hubspot.singularity.SingularityUser;
10 |
11 | @Singleton
12 | public class SingularityDisabledAuthenticator implements SingularityAuthenticator {
13 | @Inject
14 | public SingularityDisabledAuthenticator() {}
15 |
16 | @Override
17 | public Optional getUser(ContainerRequestContext context) {
18 | return Optional.empty();
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/SingularityUI/app/styles/stylus/circular-progress-bar.styl:
--------------------------------------------------------------------------------
1 | @import 'colors.styl'
2 |
3 | .CircularProgressbar .CircularProgressbar-path {
4 | stroke: #3e98c7;
5 | stroke-linecap: round;
6 | transition: stroke-dashoffset 0.5s ease 0s;
7 | }
8 |
9 | .info {
10 | .CircularProgressbar .CircularProgressbar-path {
11 | stroke: $grey-medium;
12 | }
13 |
14 | .CircularProgressbar .CircularProgressbar-text {
15 | fill: $grey-medium;
16 | }
17 | }
18 |
19 | .CircularProgressbar .CircularProgressbar-trail {
20 | stroke: #d6d6d6;
21 | }
22 |
23 | .CircularProgressbar .CircularProgressbar-text {
24 | fill: #3e98c7;
25 | font-size: 20px;
26 | dominant-baseline: middle;
27 | text-anchor: middle;
28 | }
29 |
--------------------------------------------------------------------------------
/SingularityUI/SingularityTailer/src/components/TailerProvider.js:
--------------------------------------------------------------------------------
1 | import { Component, PropTypes, Children } from 'react';
2 |
3 | export default class TailerProvider extends Component {
4 | constructor(props, context) {
5 | super(props, context);
6 | this.getTailerState = props.getTailerState;
7 | }
8 |
9 | getChildContext() {
10 | return { getTailerState: this.getTailerState };
11 | }
12 |
13 | render() {
14 | return Children.only(this.props.children);
15 | }
16 | }
17 |
18 | TailerProvider.propTypes = {
19 | getTailerState: PropTypes.func.isRequired,
20 | children: PropTypes.element
21 | };
22 |
23 | TailerProvider.childContextTypes = {
24 | getTailerState: PropTypes.func.isRequired
25 | };
26 |
--------------------------------------------------------------------------------
/SingularityUI/app/actions/api/inactive.es6:
--------------------------------------------------------------------------------
1 | import { buildApiAction } from './base';
2 |
3 | export const DeactivateHost = buildApiAction(
4 | 'DEACTIVATE_HOST',
5 | (host) => ({
6 | method: 'POST',
7 | url: `/inactive?host=${host}`
8 | })
9 | );
10 |
11 | export const ReactivateHost = buildApiAction(
12 | 'REACTIVATE_HOST',
13 | (host) => ({
14 | method: 'DELETE',
15 | url: `/inactive?host=${host}`
16 | })
17 | );
18 |
19 | export const FetchInactiveHosts = buildApiAction(
20 | 'FETCH_INACTIVE_HOST',
21 | {url: '/inactive'}
22 | );
23 |
24 | export const ClearInactiveHosts = buildApiAction(
25 | 'Clear_INACTIVE_HOSTS',
26 | {
27 | method: 'DELETE',
28 | url: '/inactive/all'
29 | }
30 | );
31 |
--------------------------------------------------------------------------------
/SingularityUI/app/components/common/NotFound.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import rootComponent from '../../rootComponent';
3 |
4 | import { Link } from 'react-router';
5 |
6 | const NotFound = (props) => (
7 |
8 |
9 |
Not found
10 | The page you are looking for doesn't exist:
11 | {props.location.pathname}
12 |
13 |
14 |
{"Go home"}
15 |
16 |
17 | );
18 |
19 | NotFound.propTypes = {
20 | location: React.PropTypes.object.isRequired
21 | };
22 |
23 | export default rootComponent(NotFound);
24 | export const NotFoundNoRoot = NotFound;
25 |
--------------------------------------------------------------------------------
/SingularityUI/app/styles/stylus/forms.styl:
--------------------------------------------------------------------------------
1 | @import colors
2 |
3 | // Form helpers
4 |
5 | label
6 | &.label-light
7 | font-weight normal
8 |
9 | .cmd-description
10 | margin-top 10px
11 | font-style oblique
12 |
13 | .check-label
14 | margin-top 15px
15 |
16 | .hidden
17 | display none
18 |
19 | #cmd-confirm
20 | color $green
21 |
22 | .remove-button
23 | position absolute
24 | top 0.75em
25 | right 1.5em
26 | width 2em
27 | height 2em
28 | line-height 1.75em
29 | text-align center
30 |
31 | &:hover
32 | background #fff
33 | border-radius 3px
34 | cursor pointer
35 |
36 | &:after
37 | content '×'
38 | font-size 20px
39 | color #999
40 |
--------------------------------------------------------------------------------
/SingularityUI/app/components/logs/TaskStatusIndicator.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Utils from '../../utils';
3 |
4 | class TaskStatusIndicator extends React.Component {
5 | getClassName() {
6 | if (Utils.isIn(this.props.status, Utils.TERMINAL_TASK_STATES)) {
7 | return 'bg-danger';
8 | }
9 | return 'bg-info running';
10 | }
11 |
12 | render() {
13 | if (this.props.status) {
14 | return {this.props.status.toLowerCase().replace('_', ' ')}
;
15 | }
16 | return ;
17 | }
18 | }
19 |
20 | TaskStatusIndicator.propTypes = { status: React.PropTypes.string };
21 |
22 | export default TaskStatusIndicator;
23 |
--------------------------------------------------------------------------------
/SingularityUI/app/components/machines/usage/LabeledColumn.jsx:
--------------------------------------------------------------------------------
1 | import React, { PropTypes } from 'react';
2 |
3 | const LabeledSection = ({title, width, children, className}) => (
4 |
5 |
{title}
6 |
7 |
8 | {children}
9 |
10 |
11 |
12 | );
13 |
14 | LabeledSection.propTypes = {
15 | title: PropTypes.string,
16 | width: PropTypes.number.isRequired,
17 | children: React.PropTypes.oneOfType([
18 | React.PropTypes.arrayOf(React.PropTypes.node),
19 | React.PropTypes.node
20 | ]).isRequired,
21 | className: PropTypes.string
22 | };
23 |
24 | export default LabeledSection;
25 |
--------------------------------------------------------------------------------
/SingularityService/src/main/java/com/hubspot/singularity/config/SentryConfiguration.java:
--------------------------------------------------------------------------------
1 | package com.hubspot.singularity.config;
2 |
3 | import org.hibernate.validator.constraints.NotEmpty;
4 |
5 | import com.fasterxml.jackson.annotation.JsonProperty;
6 |
7 | public class SentryConfiguration {
8 |
9 | @NotEmpty
10 | @JsonProperty("dsn")
11 | private String dsn;
12 |
13 | @JsonProperty("prefix")
14 | private String prefix = "";
15 |
16 | public String getDsn() {
17 | return dsn;
18 | }
19 |
20 | public void setDsn(String dsn) {
21 | this.dsn = dsn;
22 | }
23 |
24 | public String getPrefix() {
25 | return prefix;
26 | }
27 |
28 | public void setPrefix(String prefix) {
29 | this.prefix = prefix;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/SingularityUI/app/components/common/Section.jsx:
--------------------------------------------------------------------------------
1 | import React, { PropTypes } from 'react';
2 |
3 | const Section = ({id, title, subtitle, children}) => (
4 |
5 |
6 |
7 | {title}
8 | {subtitle}
9 |
10 |
11 |
12 | {children}
13 |
14 | );
15 |
16 | Section.propTypes = {
17 | id: PropTypes.string,
18 | title: PropTypes.oneOfType([
19 | PropTypes.node,
20 | PropTypes.arrayOf(PropTypes.node),
21 | PropTypes.string
22 | ]).isRequired,
23 | subtitle: PropTypes.string,
24 | children: PropTypes.oneOfType([
25 | PropTypes.node,
26 | PropTypes.arrayOf(PropTypes.node)
27 | ])
28 | };
29 |
30 | export default Section;
31 |
--------------------------------------------------------------------------------
/SingularityBase/src/main/java/com/hubspot/singularity/SlaveMatchState.java:
--------------------------------------------------------------------------------
1 | package com.hubspot.singularity;
2 |
3 | public enum SlaveMatchState {
4 | OK(true),
5 | NOT_RACK_OR_SLAVE_PARTICULAR(true),
6 | RESOURCES_DO_NOT_MATCH(false),
7 | RACK_SATURATED(false),
8 | SLAVE_SATURATED(false),
9 | SLAVE_DECOMMISSIONING(false),
10 | RACK_DECOMMISSIONING(false),
11 | RACK_AFFINITY_NOT_MATCHING(false),
12 | SLAVE_ATTRIBUTES_DO_NOT_MATCH(false),
13 | SLAVE_FROZEN(false),
14 | RACK_FROZEN(false);
15 |
16 | private final boolean isMatchAllowed;
17 |
18 | private SlaveMatchState(boolean isMatchAllowed) {
19 | this.isMatchAllowed = isMatchAllowed;
20 | }
21 |
22 | public boolean isMatchAllowed() {
23 | return isMatchAllowed;
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/SingularityService/src/main/java/com/hubspot/singularity/data/transcoders/StringTranscoder.java:
--------------------------------------------------------------------------------
1 | package com.hubspot.singularity.data.transcoders;
2 |
3 | import static java.nio.charset.StandardCharsets.UTF_8;
4 |
5 | import javax.annotation.Nullable;
6 |
7 | public class StringTranscoder implements Transcoder {
8 |
9 | public static final StringTranscoder INSTANCE = new StringTranscoder();
10 |
11 | private static final byte[] EMPTY_BYTES = new byte[0];
12 |
13 | @Override
14 | public String fromBytes(@Nullable byte[] data) {
15 | return data == null ? "" : new String(data, UTF_8);
16 | }
17 |
18 | @Override
19 | public byte[] toBytes(@Nullable String object) {
20 | return object == null ? EMPTY_BYTES : object.getBytes(UTF_8);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/SingularityUI/app/actions/ui/requests.es6:
--------------------------------------------------------------------------------
1 | import { FetchRequestsInState, FetchRequestIds } from '../../actions/api/requests';
2 | import { FetchRequestUtilizations } from '../../actions/api/utilization';
3 |
4 | export const refresh = (state, propertyFilter) => (dispatch) => {
5 | const promises = []
6 | promises.push(dispatch(FetchRequestsInState.trigger(state === 'cleaning' ? 'cleanup' : state, true, propertyFilter)));
7 | promises.push(dispatch(FetchRequestUtilizations.trigger()));
8 | return Promise.all(promises);
9 | }
10 |
11 | export const initialize = (requestIds) => (dispatch) => {
12 | if (requestIds.isFetching || requestIds.data.length) {
13 | return Promise.resolve();
14 | } else {
15 | return dispatch(FetchRequestIds.trigger());
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/SingularityService/src/main/java/com/hubspot/singularity/data/zkmigrations/TaskManagerRequiredParentsForTransactionsMigration.java:
--------------------------------------------------------------------------------
1 | package com.hubspot.singularity.data.zkmigrations;
2 |
3 | import javax.inject.Singleton;
4 |
5 | import com.google.inject.Inject;
6 | import com.hubspot.singularity.data.TaskManager;
7 |
8 | @Singleton
9 | public class TaskManagerRequiredParentsForTransactionsMigration extends ZkDataMigration {
10 |
11 | private final TaskManager taskManager;
12 |
13 | @Inject
14 | public TaskManagerRequiredParentsForTransactionsMigration(TaskManager taskManager) {
15 | super(5);
16 | this.taskManager = taskManager;
17 | }
18 |
19 | @Override
20 | public void applyMigration() {
21 | taskManager.createRequiredParents();
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/SingularityUI/app/store.es6:
--------------------------------------------------------------------------------
1 | import { createStore, compose, applyMiddleware } from 'redux';
2 | import thunk from 'redux-thunk';
3 | import { routerMiddleware } from 'react-router-redux';
4 |
5 | import rootReducer from 'reducers';
6 |
7 | export default function configureStore(initialState = {}, browserHistory) {
8 | const middlewares = [thunk, routerMiddleware(browserHistory)];
9 |
10 | let composeEnhancers = compose;
11 | if (window.localStorage.enableReduxExtension) {
12 | if (window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__) composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;
13 | }
14 |
15 | const store = createStore(rootReducer, initialState, composeEnhancers(
16 | applyMiddleware.apply(this, middlewares)
17 | ));
18 |
19 | return store;
20 | }
21 |
--------------------------------------------------------------------------------
/Docs/releases/0.15.1.md:
--------------------------------------------------------------------------------
1 | ## Changes in `0.15.1`
2 |
3 | This is a bug fix release!
4 |
5 | Check out the [0.15.1 milestone](https://github.com/HubSpot/Singularity/issues?q=milestone%3A%0.15.1+is%3Aclosed) to see updates in detail.
6 |
7 | ### Bug Fixes
8 |
9 | - [1520](https://github.com/HubSpot/Singularity/pull/1520) - Fix for request stuck in deleting state
10 | - [1529](https://github.com/HubSpot/Singularity/pull/1529) - Default cacheOffers to false and add docs
11 | - [1530](https://github.com/HubSpot/Singularity/pull/1530) - Fix for Optional request bodies
12 |
13 | ### Documentation
14 |
15 | - [1527](https://github.com/HubSpot/Singularity/pull/1527) - Typo in documentation
16 | - [1531](https://github.com/HubSpot/Singularity/pull/1531) - Bump version numbers in documentation
17 |
--------------------------------------------------------------------------------
/SingularityUI/app/reducers/ui/slaves.es6:
--------------------------------------------------------------------------------
1 | import * as SlavesActions from '../../actions/ui/slaves';
2 | import Utils from '../../utils';
3 |
4 | const initialState = {
5 | columns: window.localStorage.hasOwnProperty('slaves.columns')
6 | ? JSON.parse(window.localStorage.getItem('slaves.columns'))
7 | : Utils.DEFAULT_SLAVES_COLUMNS,
8 | paginated: window.localStorage.hasOwnProperty('slaves.paginated')
9 | ? (localStorage.getItem('slaves.paginated') == "true")
10 | : true
11 | };
12 |
13 | export default (state = initialState, action) => {
14 | if (action.type === SlavesActions.UPDATE_SLAVES_TABLE_SETTINGS) {
15 | return {
16 | columns: action.columns,
17 | paginated: action.paginated
18 | };
19 | } else {
20 | return state;
21 | }
22 | };
23 |
--------------------------------------------------------------------------------
/SingularityService/src/main/java/com/hubspot/singularity/auth/datastore/SingularityDisabledAuthDatastore.java:
--------------------------------------------------------------------------------
1 | package com.hubspot.singularity.auth.datastore;
2 |
3 | import java.util.Optional;
4 |
5 | import com.google.inject.Inject;
6 | import com.google.inject.Singleton;
7 | import com.hubspot.singularity.SingularityUser;
8 |
9 | @Singleton
10 | public class SingularityDisabledAuthDatastore implements SingularityAuthDatastore {
11 | @Inject
12 | public SingularityDisabledAuthDatastore() {}
13 |
14 | @Override
15 | public Optional getUser(String username) {
16 | return Optional.empty();
17 | }
18 |
19 | @Override
20 | public com.google.common.base.Optional isHealthy() {
21 | return com.google.common.base.Optional.absent();
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/SingularityService/src/main/java/com/hubspot/singularity/smtp/SingularityMailTaskHistoryUpdate.java:
--------------------------------------------------------------------------------
1 | package com.hubspot.singularity.smtp;
2 |
3 | /**
4 | * POJO for Jade to generate task history tables in emails.
5 | */
6 | public class SingularityMailTaskHistoryUpdate {
7 | private final String date;
8 | private final String update;
9 | private final String message;
10 |
11 | public SingularityMailTaskHistoryUpdate(String date, String update, String message) {
12 | this.date = date;
13 | this.update = update;
14 | this.message = message;
15 | }
16 |
17 | public String getDate() {
18 | return date;
19 | }
20 |
21 | public String getUpdate() {
22 | return update;
23 | }
24 |
25 | public String getMessage() {
26 | return message;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClientException.java:
--------------------------------------------------------------------------------
1 | package com.hubspot.singularity.client;
2 |
3 | @SuppressWarnings("serial")
4 | public class SingularityClientException extends RuntimeException {
5 |
6 | private int statusCode;
7 |
8 | public SingularityClientException() {
9 | super();
10 | }
11 |
12 | public SingularityClientException(String message) {
13 | super(message);
14 | }
15 |
16 | public SingularityClientException(String message, int statusCode) {
17 | super(message);
18 | this.statusCode = statusCode;
19 | }
20 |
21 | public SingularityClientException(String message, Throwable t) {
22 | super(message, t);
23 | }
24 |
25 | public int getStatusCode() {
26 | return statusCode;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/SingularityUI/README.md:
--------------------------------------------------------------------------------
1 | Singularity UI is a single page web app that uses Singularity API to:
2 | - Display information about active and historical requests and deploys and their underlying tasks
3 | - Display task artifacts (the relevant application folder tree), tail and download task logs
4 | - Display slave hosts that are part of the Mesos Cluster and decommission them
5 | - Pause and Delete registered deployable items (Singularity Requests)
6 | - Check / Debug the API JSON payloads for requests, deploys, tasks and statuses
7 | - Register / update the information of Deployable Items (i.e. post Singularity Requests)
8 | - Execute Deploys (Post Deploy requests)
9 |
10 | To find out how to deploy Singularity UI for development check [Singularity UI for Developers](../Docs/development/ui.md)
11 |
--------------------------------------------------------------------------------
/SingularityUI/test/utils.test.js:
--------------------------------------------------------------------------------
1 | import expect from 'expect';
2 |
3 | import Utils from '../app/utils';
4 |
5 | describe('Utils', () => {
6 | describe('getTaskDataFromTaskId()', () => {
7 | it('should grab all fields from a valid task id', () => {
8 | expect(Utils.getTaskDataFromTaskId('InternalEmailCronJobs-fsgj-92_13_3-1479418265674-1-hostname.example.com-us_east_1e'))
9 | .toEqual({
10 | id: 'InternalEmailCronJobs-fsgj-92_13_3-1479418265674-1-hostname.example.com-us_east_1e',
11 | rackId: 'us_east_1e',
12 | host: 'hostname.example.com',
13 | instanceNo: '1',
14 | startedAt: '1479418265674',
15 | deployId: '92_13_3',
16 | requestId: 'InternalEmailCronJobs-fsgj'
17 | });
18 | });
19 | });
20 | });
--------------------------------------------------------------------------------
/docker_release.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e
3 |
4 | RELEASE_VERSION=$1
5 | NEW_VERSION=$2
6 |
7 | git checkout "Singularity-$RELEASE_VERSION"
8 | mvn clean package docker:build -DskipTests
9 |
10 | git checkout master
11 | mvn clean package docker:build -DskipTests
12 |
13 | docker tag hubspot/singularityservice:$NEW_VERSION hubspot/singularityservice:latest
14 | docker tag hubspot/singularityexecutorslave:$NEW_VERSION hubspot/singularityexecutorslave:latest
15 | docker push hubspot/singularityservice:$RELEASE_VERSION && docker push hubspot/singularityservice:$NEW_VERSION && docker push hubspot/singularityservice:latest && docker push hubspot/singularityexecutorslave:$RELEASE_VERSION && docker push hubspot/singularityexecutorslave:$NEW_VERSION && docker push hubspot/singularityexecutorslave:latest
16 |
--------------------------------------------------------------------------------
/SingularityBase/src/main/java/com/hubspot/singularity/SingularityId.java:
--------------------------------------------------------------------------------
1 | package com.hubspot.singularity;
2 |
3 | public abstract class SingularityId {
4 |
5 | private final String id;
6 |
7 | public SingularityId(String id) {
8 | this.id = id;
9 | }
10 |
11 | @Override
12 | public int hashCode() {
13 | return id.hashCode();
14 | }
15 |
16 | public String getId() {
17 | return id;
18 | }
19 |
20 | @Override
21 | public boolean equals(Object obj) {
22 | if (this == obj) {
23 | return true;
24 | }
25 | if (obj == null) {
26 | return false;
27 | }
28 | if (getClass() != obj.getClass()) {
29 | return false;
30 | }
31 | SingularityId other = (SingularityId) obj;
32 | return id.equals(other.id);
33 | }
34 |
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/SingularityService/src/main/java/com/hubspot/singularity/mesos/OfferCache.java:
--------------------------------------------------------------------------------
1 | package com.hubspot.singularity.mesos;
2 |
3 | import java.util.List;
4 |
5 | import org.apache.mesos.v1.Protos.Offer;
6 | import org.apache.mesos.v1.Protos.OfferID;
7 |
8 | import com.hubspot.singularity.mesos.SingularityOfferCache.CachedOffer;
9 |
10 | public interface OfferCache {
11 |
12 | public void cacheOffer(long timestamp, Offer offer);
13 |
14 | public void rescindOffer(OfferID offerId);
15 |
16 | public void useOffer(CachedOffer cachedOffer);
17 |
18 | public List checkoutOffers();
19 |
20 | public void returnOffer(CachedOffer cachedOffer);
21 |
22 | public List peekOffers();
23 |
24 | public void disableOfferCache();
25 |
26 | public void enableOfferCache();
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/SingularityExecutor/src/main/java/com/hubspot/singularity/executor/handlebars/IfHasNewLinesOrBackticksHelper.java:
--------------------------------------------------------------------------------
1 | package com.hubspot.singularity.executor.handlebars;
2 |
3 |
4 | import java.io.IOException;
5 |
6 | import com.github.jknack.handlebars.Helper;
7 | import com.github.jknack.handlebars.Options;
8 |
9 | public class IfHasNewLinesOrBackticksHelper implements Helper