--- kind: Template apiVersion: v1 metadata: name: startx-vdi-firefox-build-template annotations: openshift.io/display-name: Startx Firefox browser (fedora) description: Firefox browser for simple web application running under Fedora iconClass: icon-aerogear tags: startx,os,fedora,firefox openshift.io/long-description: This template provides an Firefox browser in a fedora container. Ready to use in openshift with a simple deployement config, or as a s2i builder for building personalized browser container. For more information about using this image, including OpenShift considerations, see https://gitlab.com/startx1/containers/blob/master/README.md. openshift.io/provider-display-name: STARTX openshift.io/documentation-url: https://gitlab.com/startx1/containers/blob/master/README.md openshift.io/support-url: https://gitlab.com/startx1/containers/issues/new message: "The following container have been created in your project: ${APP_NAME} and you can use openshift console to log into." labels: template: startx-vdi-firefox-build-template provider: startx objects: - kind: ImageStream apiVersion: v1 metadata: name: startx-vdi-firefox annotations: openshift.io/display-name: Startx Browser openshift.io/generated-by: STARTX labels: base-image: startx-vdi-firefox app: "${APP_NAME}" type: "${APP_TYPE}" provider: startx spec: tags: - name: latest annotations: openshift.io/display-name: Startx Browser (Fedora rawhide) description: Container-based desktop Firefox browser for remote internet browsing under Fedora rawhide iconClass: icon-aerogear tags: builder,startx,fedora,firefox,vnc supports: vnc version: latest sampleRepo: https://gitlab.com/startx1/containers-example-firefox.git from: kind: DockerImage name: startx/vdi-firefox:latest - kind: ImageStream apiVersion: v1 metadata: name: "${APP_NAME}" annotations: openshift.io/display-name: Application ${APP_NAME} openshift.io/generated-by: STARTX labels: base-image: startx-vdi-firefox app: "${APP_NAME}" type: "${APP_TYPE}" provider: startx spec: tags: - name: latest annotations: openshift.io/display-name: Application ${APP_NAME} description: Base image for the application ${APP_NAME} iconClass: icon-aerogear tags: startx,fedora,firefox,vnc,application,${APP_NAME} supports: vnc version: latest - kind: DeploymentConfig apiVersion: v1 metadata: name: "${APP_NAME}" labels: app: "${APP_NAME}" type: "${APP_TYPE}" provider: startx template: startx-vdi-firefox-build-template annotations: openshift.io/generated-by: STARTX spec: strategy: type: Rolling rollingParams: updatePeriodSeconds: 1 intervalSeconds: 1 timeoutSeconds: 90 maxUnavailable: 25% maxSurge: 25% pre: failurePolicy: Abort execNewPod: command: - "/bin/sx-firefox" - pre-deploy env: - name: SX_VERBOSE value: "true" - name: SX_DEBUG value: "true" containerName: "${APP_NAME}" post: failurePolicy: Abort execNewPod: command: - "/bin/sx-firefox" - post-deploy env: - name: SX_VERBOSE value: "true" - name: SX_DEBUG value: "true" containerName: "${APP_NAME}" triggers: - type: ImageChange imageChangeParams: automatic: true containerNames: - "${APP_NAME}" from: kind: ImageStreamTag name: "${APP_NAME}:latest" - type: ConfigChange postCommit: script: "/bin/sx-firefox info" replicas: 1 test: false selector: app: "${APP_NAME}" deploymentconfig: "${APP_NAME}" template: metadata: labels: app: "${APP_NAME}" type: "${APP_TYPE}" provider: startx template: startx-vdi-firefox-build-template deploymentconfig: "${APP_NAME}" annotations: openshift.io/generated-by: STARTX spec: containers: - name: "${APP_NAME}" image: " " env: - name: SX_VERBOSE value: "true" command: - "/bin/sx-firefox" args: - run livenessProbe: exec: command: - "/bin/sx-firefox" - isLive initialDelaySeconds: 4 timeoutSeconds: 1 periodSeconds: 10 successThreshold: 1 failureThreshold: 3 readinessProbe: exec: command: - "/bin/sx-firefox" - isReady initialDelaySeconds: 4 timeoutSeconds: 1 periodSeconds: 10 successThreshold: 1 failureThreshold: 3 resources: limits: cpu: 10000m memory: "${MEMORY_LIMIT}" requests: cpu: 200m memory: "${MEMORY_LIMIT}" terminationMessagePath: "/dev/termination-log" imagePullPolicy: Always volumeMounts: - name: "${APP_NAME}-shm" mountPath: "/dev/shm" - name: "${APP_NAME}-data" mountPath: "/home/firefox" volumes: - name: "${APP_NAME}-shm" hostPath: path: "/dev/shm" - name: "${APP_NAME}-data" emptyDir: medium: "" restartPolicy: Always terminationGracePeriodSeconds: 30 dnsPolicy: ClusterFirst securityContext: {} - kind: Route apiVersion: v1 metadata: name: "${APP_NAME}" labels: app: "${APP_NAME}" type: "${APP_TYPE}" provider: startx template: startx-vdi-firefox-build-template annotations: openshift.io/generated-by: STARTX spec: to: kind: Service name: "${APP_NAME}" weight: 100 - kind: Service apiVersion: v1 metadata: name: "${APP_NAME}" labels: app: "${APP_NAME}" type: "${APP_TYPE}" provider: startx template: startx-vdi-firefox-build-template annotations: openshift.io/generated-by: STARTX spec: ports: - protocol: TCP port: 5900 targetPort: 5900 selector: app: "${APP_NAME}" deploymentconfig: "${APP_NAME}" type: ClusterIP sessionAffinity: None - kind: BuildConfig apiVersion: v1 metadata: name: "${APP_NAME}" labels: app: "${APP_NAME}" type: "${APP_TYPE}" provider: startx template: startx-vdi-firefox-build-template annotations: openshift.io/generated-by: STARTX spec: triggers: - type: GitHub github: secret: "${WEBHOOK_TOKEN}_${APP_NAME}" - type: Generic generic: secret: "${WEBHOOK_TOKEN}_${APP_NAME}" - type: ImageChange imageChange: {} - type: ConfigChange runPolicy: SerialLatestOnly source: type: Git git: uri: "${SOURCE_GIT}" ref: "${SOURCE_BRANCH}" strategy: type: Source sourceStrategy: from: kind: ImageStreamTag name: startx-vdi-firefox:latest env: - name: SX_VERBOSE value: "true" output: to: kind: ImageStreamTag name: "${APP_NAME}:latest" postCommit: command: - "/bin/sx-firefox" - post-build parameters: - name: APP_NAME displayName: Application name description: The name of the created application value: c required: true - name: APP_TYPE displayName: Application type description: The type of the created application value: application - name: SOURCE_GIT displayName: Source repository description: URL to the source code to use during build process value: https://gitlab.com/startx1/containers-example-firefox.git required: true - name: SOURCE_BRANCH displayName: Source branch description: Name of the default branch value: master required: true - name: WEBHOOK_TOKEN displayName: Webhook token description: Secret token to use for webhook to github or generic generate: expression from: "[a-zA-Z0-9]{24}" required: true - name: MEMORY_LIMIT displayName: Memory Limit description: Maximum amount of memory the container can use. e.g. 512Mi, 2Gi. value: 2048Mi required: true