Skip to content

Commit

Permalink
support DOCKER deploy mode
Browse files Browse the repository at this point in the history
  • Loading branch information
miles-grant-ibigroup committed Jan 24, 2024
1 parent 90ef04b commit 62faea0
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 4 deletions.
36 changes: 32 additions & 4 deletions lib/manager/components/deployment/DeploymentConfigurationsPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ import {
ListGroupItem,
Button,
Panel,
Glyphicon
Glyphicon,
Radio,
FormGroup
} from 'react-bootstrap'
import Select from 'react-select'
import validator from 'validator'
Expand Down Expand Up @@ -148,7 +150,11 @@ export default class DeploymentConfigurationsPanel extends Component<{

_onUpdateTripPlannerVersion = (option: ReactSelectOption) => {
const {deployment, updateDeployment} = this.props
updateDeployment(deployment, { tripPlannerVersion: option.value })
updateDeployment(deployment, { tripPlannerVersion: option.value, deploymentMode: 'RUNNER' })
}
_onUpdateDeploymentMode = (e) => {
const {deployment, updateDeployment} = this.props
updateDeployment(deployment, { deploymentMode: e.target.value })
}

_onUpdateVersion = (option: ReactSelectOption) => {
Expand Down Expand Up @@ -181,15 +187,37 @@ export default class DeploymentConfigurationsPanel extends Component<{
options={TRIP_PLANNER_VERSIONS}
value={deployment.tripPlannerVersion}
/>
<div>
{deployment.tripPlannerVersion === 'OTP_2' && <>
Deployment method
<FormGroup>
<Radio
checked={deployment.deploymentMode === 'RUNNER'}
name='RUNNER'
value='RUNNER'
onChange={this._onUpdateDeploymentMode}
inline>
OTP Runner
</Radio>
<Radio
checked={deployment.deploymentMode === 'DOCKER'}
name='DOCKER'
value='DOCKER'
onChange={this._onUpdateDeploymentMode}
inline>
Docker
</Radio>
</FormGroup>
</>}
{/** TODO: re-enable optional jar file selection once graph build is dockerized */}
{<div> {/* deployment.deploymentMode !== 'DOCKER' && <div> */}
OTP jar file
<Select
clearable={false}
onChange={this._onUpdateVersion}
options={options ? options.map(v => ({value: v, label: v})) : []}
value={deployment.otpVersion}
/>
</div>
</div>}
</ListGroupItem>
<ListGroupItem>
Deploying to the{' '}
Expand Down
2 changes: 2 additions & 0 deletions lib/types/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ export type Deployment = {
dateCreated: number,
deployJobSummaries: Array<DeploySummary>,
deployedTo: ?string,
deploymentMode: ?string,
deploymentType: ?string,
ec2Instances?: Array<EC2InstanceSummary>,
feedSourceId: ?string,
feedVersions: Array<SummarizedFeedVersion>,
Expand Down

0 comments on commit 62faea0

Please sign in to comment.