Friday, November 5, 2021

Almacenar el token de github

git config credential.helper store

Friday, August 6, 2021

eks

 #master1

cluster.name: cluster-1

node.name: master-1

path.data: /var/lib/elasticsearch

path.logs: /var/log/elasticsearch

network.host: [_local_, _site_]

discovery.seed_hosts: ["10.0.1.101"]

cluster.initial_master_nodes: ["master-1"]

node.master: true

node.data: false

node.ingest: false

node.ml: false



----------------

#nodo1

cluster.name: cluster-1

node.name: data-1

node.attr.temp: hot

path.data: /var/lib/elasticsearch

path.logs: /var/log/elasticsearch

network.host: [_local_, _site_]

discovery.seed_hosts: ["10.0.1.101"]

cluster.initial_master_nodes: ["master-1"]

node.master: false

node.data: true

node.ingest: true

node.ml: false



-----------------------

#nodo2


cluster.name: cluster-1

node.name: data-2

node.attr.temp: warm

path.data: /var/lib/elasticsearch

path.logs: /var/log/elasticsearch

network.host: [_local_, _site_]

discovery.seed_hosts: ["10.0.1.101"]

cluster.initial_master_nodes: ["master-1"]

node.master: false

node.data: true

node.ingest: true

node.ml: false


Tuesday, June 22, 2021

pipeline final

aca dejo el pipeline final, el que tanto dolor de cabeza me trajo.


 https://github.com/mguazzardo/pipelinefinal



template alfa

 apiVersion: template.openshift.io/v1

kind: Template

labels:

  template: phpinfo

message: |-

  The following service(s) have been created in your project: ${NAME}.


metadata:

  annotations:

    tags: quickstart,nginx

  labels:

    samples.operator.openshift.io/managed: "true"

  name: phpinfo

objects:

- apiVersion: v1

  kind: Service

  metadata:

    annotations:

      description: Exposes and load balances the application pods

    name: ${NAME}

  spec:

    ports:

    - name: web

      port: 8080

      targetPort: 8080

    selector:

      name: ${NAME}

- apiVersion: v1

  kind: Route

  metadata:

    annotations:

      template.openshift.io/expose-uri: http://{.spec.host}{.spec.path}

    name: ${NAME}

  spec:

    host: ${APPLICATION_DOMAIN}

    to:

      kind: Service

      name: ${NAME}

- apiVersion: v1

  kind: ImageStream

  metadata:

    annotations:

      description: Keeps track of changes in the application image

    name: ${NAME}

- apiVersion: v1

  kind: BuildConfig

  metadata:

    annotations:

      description: Defines how to build the application

      template.alpha.openshift.io/wait-for-ready: "true"

    name: ${NAME}

  spec:

    output:

      to:

        kind: ImageStreamTag

        name: ${NAME}:latest

    source:

      contextDir: ${CONTEXT_DIR}

      git:

        ref: ${SOURCE_REPOSITORY_REF}

        uri: ${SOURCE_REPOSITORY_URL}

      type: Git

    strategy:

      sourceStrategy:

        from:

          kind: ImageStreamTag

          name: php:7.3

          namespace: ${NAMESPACE}

      type: Source

    triggers:

    - type: ImageChange

    - type: ConfigChange

    - github:

        secret: ${GITHUB_WEBHOOK_SECRET}

      type: GitHub

    - generic:

        secret: ${GENERIC_WEBHOOK_SECRET}

      type: Generic

- apiVersion: v1

  kind: DeploymentConfig

  metadata:

    annotations:

      description: Defines how to deploy the application server

      template.alpha.openshift.io/wait-for-ready: "true"

    name: ${NAME}

  spec:

    replicas: 1

    selector:

      name: ${NAME}

    strategy:

      type: Rolling

    template:

      metadata:

        labels:

          name: ${NAME}

        name: ${NAME}

      spec:

        containers:

        - env: []

          image: ' '

          livenessProbe:

            httpGet:

              path: /

              port: 8080

            initialDelaySeconds: 30

            timeoutSeconds: 3

          name: phpinfo

          ports:

          - containerPort: 8080

          readinessProbe:

            httpGet:

              path: /

              port: 8080

            initialDelaySeconds: 3

            timeoutSeconds: 3

          resources:

            limits:

              memory: ${MEMORY_LIMIT}

    triggers:

    - imageChangeParams:

        automatic: true

        containerNames:

        - phpinfo

        from:

          kind: ImageStreamTag

          name: ${NAME}:latest

      type: ImageChange

    - type: ConfigChange

parameters:

- description: The name assigned to all of the frontend objects defined in this template.

  displayName: Name

  name: NAME

  required: true

  value: phpinfo

- description: The OpenShift Namespace where the ImageStream resides.

  displayName: Namespace

  name: NAMESPACE

  required: true

  value: openshift

- description: Version of NGINX image to be used (1.16-el8 by default).

  displayName: NGINX Version

  name: NGINX_VERSION

  required: true

  value: 1.16-el8

- description: Maximum amount of memory the container can use.

  displayName: Memory Limit

  name: MEMORY_LIMIT

  required: true

  value: 512Mi

- description: The URL of the repository with your application source code.

  displayName: Git Repository URL

  name: SOURCE_REPOSITORY_URL

  required: true

  value: https://github.com/mguazzardo/demislamer

- description: Set this to a branch name, tag or other ref of your repository if you are not using the default branch.

  displayName: Git Reference

  name: SOURCE_REPOSITORY_REF

- description: Set this to the relative path to your project if it is not in the root of your repository.

  displayName: Context Directory

  name: CONTEXT_DIR

- description: The exposed hostname that will route to the nginx service, if left blank a value will be defaulted.

  displayName: Application Hostname

  name: APPLICATION_DOMAIN

- description: Github trigger secret.  A difficult to guess string encoded as part of the webhook URL.  Not encrypted.

  displayName: GitHub Webhook Secret

  from: '[a-zA-Z0-9]{40}'

  generate: expression

  name: GITHUB_WEBHOOK_SECRET

- description: A secret string used to configure the Generic webhook.

  displayName: Generic Webhook Secret

  from: '[a-zA-Z0-9]{40}'

  generate: expression

  name: GENERIC_WEBHOOK_SECRET


Thursday, June 10, 2021

tekton

 apiVersion: tekton.dev/v1beta1

kind: Pipeline

metadata:

  name: build-and-deploy4

spec:

  workspaces:

  - name: shared-workspace

  params:

    - description: name of the deployment to be patched

      name: deployment-name

      type: string

    - default: 'https://github.com/mguazzardo/helloworld'

      description: url of the git repo for the code of deployment

      name: git-url

      type: string

    - default: master

      description: revision to be used from repo of the code for deployment

      name: git-revision

      type: string

    - default: 'image-registry.openshift-image-registry.svc:5000/debian/debian'

      description: image to be build from the code

      name: IMAGE

      type: string

  tasks:

    - name: fetch-repository

      params:

        - name: url

          value: $(params.git-url)

        - name: deleteExisting

          value: 'true'

        - name: revision

          value: $(params.git-revision)

      taskRef:

        kind: ClusterTask

        name: git-clone

      workspaces:

        - name: output

          workspace: shared-workspace

    - name: s2i-website

      params:

        - name: IMAGE

          value: image-registry.openshift-image-registry.svc:5000/debian/debian

        - name: TLSVERIFY

          value: 'false'

        - name: PATH_CONTEXT

          value: .

      runAfter:

        - fetch-repository

      taskRef:

        kind: ClusterTask

        name: s2i-php

      workspaces:

        - name: source

          workspace: shared-workspace

    - name: apply-manifests

      taskRef:

        name: apply-manifests

      workspaces:

      - name: source

        workspace: shared-workspace

      runAfter:

      - s2i-website


Tuesday, March 9, 2021

crc en linux

 https://code-ready.github.io/crc/

Friday, February 19, 2021

tagueando imagenes en registry

 docker login -u developer -p $(oc whoami -t) 172.30.1.1:5000

docker tag docker-compose-php-slim_php 172.30.1.1:5000/myproject/docker-compose-php-slim_php

docker push 172.30.1.1:5000/myproject/docker-compose-php-slim_php