Bootstrap

作者: mqddb | 来源:发表于2020-04-14 22:23 被阅读0次

    Copy docker images

    docker_images_archive_source: /home/sysadmin/req-docker-imgs
    docker_http_proxy: socks5://192.168.1.109:1080
    docker_https_proxy: socks5://192.168.1.109:1080
    
    additional_local_registry_images:
     docker.io/starlingx/stx-aodh:rc-3.0-centos-stable-latest 
     docker.io/starlingx/stx-keystone:rc-3.0-centos-stable-latest 
     docker.io/starlingx/stx-neutron:rc-3.0-centos-stable-latest 
     docker.io/starlingx/stx-nova-api-proxy:rc-3.0-centos-stable-latest 
     docker.io/starlingx/stx-nova:rc-3.0-centos-stable-latest 
     k8s.gcr.io/defaultbackend:1.4 
     docker.elastic.co/beats/metricbeat-oss:7.4.0
     docker.io/memcached:1.5.5
     docker.io/openstackhelm/mariadb:10.2.18
     docker.io/rabbitmq:3.7.13
     docker.io/starlingx/stx-barbican:rc-3.0-centos-stable-latest
     docker.io/starlingx/stx-fm-rest-api:rc-3.0-centos-stable-latest
     docker.io/starlingx/stx-heat:rc-3.0-centos-stable-latest
     docker.io/starlingx/stx-mariadb:rc-3.0-centos-stable-latest
     k8s.gcr.io/defaultbackend:1.4
     quay.io/coreos/kube-state-metrics:v1.8.0
     docker.elastic.co/beats/filebeat-oss:7.4.0 
     docker.elastic.co/elasticsearch/elasticsearch-oss:7.4.0 
     docker.elastic.co/kibana/kibana-oss:7.4.0 
     docker.elastic.co/logstash/logstash-oss:7.4.0 
     docker.io/mariadb:10.2.13 
     docker.io/starlingx/ceph-config-helper:v1.15.0 
     docker.io/starlingx/stx-ceilometer:rc-3.0-centos-stable-latest 
     docker.io/starlingx/stx-cinder:rc-3.0-centos-stable-latest 
     docker.io/starlingx/stx-gnocchi:rc-3.0-centos-stable-latest 
     docker.io/starlingx/stx-keystone-api-proxy:rc-3.0-centos-stable-latest 
     docker.io/starlingx/stx-libvirt:rc-3.0-centos-stable-latest 
     docker.io/trustpilot/beat-exporter:0.1.1 
     docker.io/untergeek/curator:5.7.6 
     quay.io/external_storage/rbd-provisioner:v2.1.1-k8s1.11 
     quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.23.0 
     quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.9.0
    
    
    # edit: /usr/share/ansible/stx-ansible/playbooks/roles/common/push-docker-images/files/download_images.py
    #client.pull(target_img)
    

    Change docker proxy

    touch /etc/systemd/system/docker.service.d/http-proxy.conf
    [Service]
    Environment="HTTP_PROXY=socks5://192.168.1.109:1080"
    Environment="HTTPS_PROXY=socks5://192.168.1.109:1080"
    

    Change sysinv code for docker proxy check

    # edit: /usr/lib64/python2.7/site-packages/sysinv/common/service_parameter.py +258
        if 'socks5' in value:
            return
    
    # edit: /usr/share/ansible/stx-ansible/playbooks/roles/bootstrap/validate-config/tasks/main.yml +423
        #- block:
        #  - name: Validate http proxy urls
        #    include: validate_url.yml input_url={{ item }}
        #    with_items:
        #      - "{{ docker_http_proxy }}"
        #      - "{{ docker_https_proxy }}"
    

    Set proxy for helm

    # edit: /usr/share/ansible/stx-ansible/playbooks/roles/bootstrap/bringup-essential-services/tasks/bringup_helm.yml
      command: helm repo update
      environment:
        http_proxy: socks5://192.168.1.109:1080
        https_proxy: socks5://192.168.1.109:1080
    
    

    Update network configure

    #!/bin/bash
    
    OAM_IF=enp2s1
    MGMT_IF=enp2s2
    system host-if-modify controller-0 lo -c none
    IFNET_UUIDS=$(system interface-network-list controller-0 | awk '{if ($6=="lo") print $4;}')
    for UUID in $IFNET_UUIDS; do
        system interface-network-remove ${UUID}
    done
    system host-if-modify controller-0 $OAM_IF -c platform
    system interface-network-assign controller-0 $OAM_IF oam
    system host-if-modify controller-0 $MGMT_IF -c platform
    system interface-network-assign controller-0 $MGMT_IF mgmt
    system interface-network-assign controller-0 $MGMT_IF cluster-host
    

    Set proxy for helm puppet file

    # edit: /usr/share/puppet/modules/platform/manifests/helm.pp +66
        environment => [ 'KUBECONFIG=/etc/kubernetes/admin.conf', 'HOME=/home/sysadmin', 'http_proxy=socks5://192.168.1.109', 'https_proxy=socks5://192.168.1.109' ],
        command     => 'helm repo update',
    
    

    Set NTP server

    system ntp-modify ntpservers=ntp.aliyun.com,ntp1.aliyun.com,ntp2.aliyun.com
    
    
    

    相关文章

      网友评论

          本文标题:Bootstrap

          本文链接:https://www.haomeiwen.com/subject/oiztmhtx.html