Run MobileFirst server on IBM Containers - ibm-cloud

I followed Link to Run IBM MobileFirst Platform Foundation on IBM Containers. I downloaded the IBM MobileFirst Platform Foundation V7.1 .zip file also. However, after following all steps that are given in previous link, I cannot access the MobileFirst console. The public IP address that was given to me is not opening link - not available.
Below is a snippet of what I did on the console. Can someone help me? What is the issue? Am I looking in the wrong direction?
1) initenv.sh – Log in to Bluemix
Suhas-iMac:~ suhas$ cf ic login
You are using version 0.8.876 of the IBM Containers plug-in.
Version 0.8.878 of the plug-in is available for you to install.
Run the "cf ic update" command to update your plug-in to the current version.
You can review the documentation to see the changes that are included in the new version.
https://www.ng.bluemix.net/docs/containers/container_cli_reference_cfic_versions.html
Deleting the old configuration file...
Retrieving client certificates from IBM Containers...
Storing client certificates in /Users/suhas/.ice/certs/...
Storing client certificates in /Users/suhas/.ice/certs/containers-api.ng.bluemix.net/f53ac5e5-93d2-41a0-b567-b621fb2bc036...
OK
The client certificates were retrieved.
Checking local Docker configuration...
OK
Authenticating with the IBM Containers registry host registry.ng.bluemix.net...
OK
You are authenticated with the IBM Containers registry.
Your organization's private Bluemix repository: registry.ng.bluemix.net/bluemix_test
You can choose from two ways to use the Docker CLI with IBM Containers:
Option 1: This option allows you to use 'cf ic' for managing containers on IBM Containers while still using the Docker CLI directly to manage your local Docker host.
Use this Cloud Foundry IBM Containers plug-in without affecting the local Docker environment:
Example Usage:
cf ic ps
cf ic images
Option 2: Use the Docker CLI directly. In this shell, override the local Docker environment by setting these variables to connect to IBM Containers. Copy and paste the following commands:
Note: Only some Docker commands are supported with this option. Run cf ic help to see which commands are supported.
export DOCKER_HOST=tcp://containers-api.ng.bluemix.net:8443
export DOCKER_CERT_PATH=/Users/suhas/.ice/certs/containers-api.ng.bluemix.net/f53ac5e5-93d2-41a0-b567-b621fb2bc036
export DOCKER_TLS_VERIFY=1
Example Usage:
docker ps
docker images
2) prepareserverdbs.sh - Prepare the MobileFirst Server database
Suhas-iMac:scripts suhas$ ./prepareserverdbs.sh
Specify the name of your Bluemix database service. (mandatory) : CloudantDB
Specify the name of your Bluemix application (mandatory) : DeveloperTest
Specify your runtime name or project name (If not specified, the script will perform the configuration of administration database) (optional) :
Specify the name of the database schema (defaults to WLADMIN for administration database or the runtime name for runtime databases) (optional) :
Arguments :
-----------
DB_SRV_NAME : CloudantDB
APP_NAME : DeveloperTest
RUNTIME_NAME :
SCHEMA_NAME : WLADMIN
JAVA_HOME: /Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home
Getting database configuration
Configuration saved in file '../usr/config/wladmin.xml'
3) prepareserver.sh - Prepare a Mobilefirst Platform Foundation Server image
Suhas-iMac:scripts suhas$ ./prepareserver.sh
Specify the name for the MobileFirst Server image. Should be of form registryUrl/repositoryNamespace/imagename (mandatory) : registry.ng.bluemix.net/ibm-mobilefirst-starter
Specify the comma-separated paths of the MobileFirst projects to be added to this image. If nothing is specified, only the projects copied to the usr/projects directory are added. (optional) : /Users/suhas/Documents/Suhas/Projects/Suhas_workspace/MobileIonic
Arguments :
-----------
SERVER_IMAGE_NAME : registry.ng.bluemix.net/ibm-mobilefirst-starter
PROJECT_LOC : /Users/suhas/Documents/Suhas/Projects/Suhas_workspace/MobileIonic
/Users/suhas/Documents/Suhas/Projects/Suhas_workspace/MobileIonic is a valid project path. Copying project artifacts.
copying adapters /Users/suhas/Documents/Suhas/Projects/Suhas_workspace/MobileIonic/bin//Authentication.adapter
copying applications /Users/suhas/Documents/Suhas/Projects/Suhas_workspace/MobileIonic/bin//Ionic-all.wlapp
/Users/suhas/Documents/Suhas/Projects/Suhas_workspace/MobileIonic/bin//Ionic-android-1.0.wlapp
/Users/suhas/Documents/Suhas/Projects/Suhas_workspace/MobileIonic/bin//Ionic-common.wlapp
/Users/suhas/Documents/Suhas/Projects/Suhas_workspace/MobileIonic/bin//Ionic-iphone-1.0.wlapp
JAVA_HOME: /Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home
******* Migrating: ../usr/projects/MobileIonic.war ********
Buildfile: /Users/suhas/Documents/Suhas/Software/Bluemix/ibm-mfpf-container-7.1.0.0-eval/mfpf-server/scripts/migrate.xml
migrate:
[copy] Copying 1 file to /Users/suhas/Documents/Suhas/Software/Bluemix/ibm-mfpf-container-7.1.0.0-eval/mfpf-server/usr/projects
[migrate] Building war: /Users/suhas/Documents/Suhas/Software/Bluemix/ibm-mfpf-container-7.1.0.0-eval/mfpf-server/usr/projects/MobileIonic.war
[migrate] May 04, 2016 1:01:24 PM com.worklight.ant.migration.MigrationTask MigrationTask.execute
[migrate] INFO: FWLST2017I: The project WAR file was successfully migrated from version 7.1.0.00.20160307-2032 to version 7.1.0.00.20160401-2103. The migrated project WAR file is located in '/Users/suhas/Documents/Suhas/Software/Bluemix/ibm-mfpf-container-7.1.0.0-eval/mfpf-server/usr/projects/MobileIonic.war'.
[delete] Deleting: /Users/suhas/Documents/Suhas/Software/Bluemix/ibm-mfpf-container-7.1.0.0-eval/mfpf-server/usr/projects/MobileIonic.war.copy
BUILD SUCCESSFUL
Total time: 2 seconds
Building the MobileFirst Server image : registry.ng.bluemix.net/ibm-mobilefirst-starter
Sending build context to Docker daemon 328.9 MB
Step 1 : FROM ubuntu:14.04
---> 8fa7f61732d6
Step 2 : MAINTAINER IBM
---> Using cache
---> d229b8a888b4
Step 3 : RUN apt-get update && apt-get install -y wget curl supervisor openssh-server && rm -rf /var/lib/apt/lists/*
---> Using cache
---> 9808ebff5148
Step 4 : ADD dependencies/ibm-java-jre-8.0-2.0-linux-x86_64_*.tgz /opt/ibm/
---> Using cache
---> a0dc20b2c209
Step 5 : ENV JAVA_HOME /opt/ibm/ibm-java-x86_64-80
---> Using cache
---> c86f1647638e
Step 6 : COPY dependencies/license-check /opt/ibm/docker/
---> Using cache
---> 989e27410e80
Step 7 : ADD dependencies/wlp-base-embeddable-8.5.5.5.tar.gz /opt/ibm/
---> Using cache
---> 5d9ae14f25c6
Step 8 : RUN /opt/ibm/wlp/bin/server create worklight && rm -rf /opt/ibm/wlp/usr/servers/.classCache && rm -rf /opt/ibm/wlp/usr/servers/worklight/apps/* && mkdir -p /opt/ibm/wlp/usr/extension/lib && mkdir -p /opt/ibm/MobileFirst/licenses
---> Using cache
---> 401a4362200b
Step 9 : RUN mkdir -p /var/run/sshd && mkdir -p /root/.ssh/ && mkdir -p /root/sshkey/ && touch /root/.ssh/authorized_keys && sed -i 's/session \+required \+pam_loginuid\.so/session optional pam_loginuid.so/' /etc/pam.d/sshd && sed -i 's/.*PasswordAuthentication yes/PasswordAuthentication no/g' /etc/ssh/sshd_config && sed -i 's/.*UsePAM yes/UsePAM no/g' /etc/ssh/sshd_config && sed -i 's/.*ChallengeResponseAuthentication yes/ChallengeResponseAuthentication no/g' /etc/ssh/sshd_config
---> Using cache
---> 3d30cf7f22fd
Step 10 : ADD mfpf-libs/mfpf-server.tgz /
---> Using cache
---> dc34745a9fb3
Step 11 : COPY licenses/ /opt/ibm/MobileFirst/licenses
---> Using cache
---> e261bcd7b0a0
Step 12 : RUN sed -i 's/^PASS_MAX_DAYS.*/PASS_MAX_DAYS 90/' /etc/login.defs && sed -i 's/sha512/sha512 minlen=8/' /etc/pam.d/common-password
---> Using cache
---> 398eacedac20
Step 13 : RUN chmod u+x /opt/ibm/docker/license-check && chmod u+x /opt/ibm/wlp/bin/liberty-run && chmod +x /root/bin/run_supervisord && mkdir /var/log/rsyslog && chown syslog /var/log/rsyslog
---> Using cache
---> 462c733ca316
Step 14 : ENV LICENSE accept
---> Using cache
---> 0229cff1dc16
Step 15 : ENTRYPOINT /bin/sh -c
---> Using cache
---> f087da87d39b
Step 16 : CMD /root/bin/run_supervisord
---> Using cache
---> 669d9282e2bb
Step 17 : COPY usr/bin/mfp-init /opt/ibm/wlp/bin/
---> Using cache
---> 9e391f615bb2
Step 18 : RUN chmod u+x /opt/ibm/wlp/bin/mfp-init
---> Using cache
---> 93773dd4696a
Step 19 : COPY usr/security /opt/ibm/wlp/usr/servers/worklight/resources/security/
---> Using cache
---> 8071c5dc3b09
Step 20 : COPY usr/jre-security /opt/ibm/ibm-java-x86_64-80/jre/lib/security/
---> Using cache
---> 2ed573a348cd
Step 21 : COPY usr/env /opt/ibm/wlp/usr/servers/worklight/
---> Using cache
---> 497113cb14de
Step 22 : COPY usr/ssh /root/sshkey/
---> Using cache
---> 2e6c13b54f38
Step 23 : COPY usr/wxs /opt/ibm/wlp/
---> Using cache
---> cf7dad492fa6
Step 24 : COPY usr/config/*.xml /opt/ibm/wlp/usr/servers/worklight/configDropins/overrides/
---> Using cache
---> ea2717eadcb2
Step 25 : COPY usr/projects/*.war /opt/ibm/wlp/usr/servers/worklight/apps/
---> 7942e1575dd7
Removing intermediate container 518e64eb27a5
Step 26 : RUN apt-get update && apt-get upgrade -y
---> Running in dcba8aa68e4b
Ign http://archive.ubuntu.com trusty InRelease
Get:1 http://archive.ubuntu.com trusty-updates InRelease [65.9 kB]
Get:2 http://archive.ubuntu.com trusty-security InRelease [65.9 kB]
Get:3 http://archive.ubuntu.com trusty Release.gpg [933 B]
Get:4 http://archive.ubuntu.com trusty Release [58.5 kB]
Get:5 http://archive.ubuntu.com trusty-updates/main Sources [344 kB]
Get:6 http://archive.ubuntu.com trusty-updates/restricted Sources [5217 B]
Get:7 http://archive.ubuntu.com trusty-updates/universe Sources [194 kB]
Get:8 http://archive.ubuntu.com trusty-updates/main amd64 Packages [949 kB]
Get:9 http://archive.ubuntu.com trusty-updates/restricted amd64 Packages [23.5 kB]
Get:10 http://archive.ubuntu.com trusty-updates/universe amd64 Packages [464 kB]
Get:11 http://archive.ubuntu.com trusty-security/main Sources [143 kB]
Get:12 http://archive.ubuntu.com trusty-security/restricted Sources [3920 B]
Get:13 http://archive.ubuntu.com trusty-security/universe Sources [41.8 kB]
Get:14 http://archive.ubuntu.com trusty-security/main amd64 Packages [574 kB]
Get:15 http://archive.ubuntu.com trusty-security/restricted amd64 Packages [20.2 kB]
Get:16 http://archive.ubuntu.com trusty-security/universe amd64 Packages [165 kB]
Get:17 http://archive.ubuntu.com trusty/main Sources [1335 kB]
Get:18 http://archive.ubuntu.com trusty/restricted Sources [5335 B]
Get:19 http://archive.ubuntu.com trusty/universe Sources [7926 kB]
Get:20 http://archive.ubuntu.com trusty/main amd64 Packages [1743 kB]
Get:21 http://archive.ubuntu.com trusty/restricted amd64 Packages [16.0 kB]
Get:22 http://archive.ubuntu.com trusty/universe amd64 Packages [7589 kB]
Fetched 21.7 MB in 2min 27s (147 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be upgraded:
dpkg libssl1.0.0 libtasn1-6 openssl
4 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 3318 kB of archives.
After this operation, 1024 B of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu/ trusty-updates/main dpkg amd64 1.17.5ubuntu5.6 [1956 kB]
Get:2 http://archive.ubuntu.com/ubuntu/ trusty-updates/main libssl1.0.0 amd64 1.0.1f-1ubuntu2.19 [828 kB]
Get:3 http://archive.ubuntu.com/ubuntu/ trusty-updates/main libtasn1-6 amd64 3.4-3ubuntu0.4 [43.6 kB]
Get:4 http://archive.ubuntu.com/ubuntu/ trusty-updates/main openssl amd64 1.0.1f-1ubuntu2.19 [490 kB]
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
dpkg-preconfigure: unable to re-open stdin:
Fetched 3318 kB in 5s (583 kB/s)
(Reading database ... 16382 files and directories currently installed.)
Preparing to unpack .../dpkg_1.17.5ubuntu5.6_amd64.deb ...
Unpacking dpkg (1.17.5ubuntu5.6) over (1.17.5ubuntu5.5) ...
Setting up dpkg (1.17.5ubuntu5.6) ...
(Reading database ... 16382 files and directories currently installed.)
Preparing to unpack .../libssl1.0.0_1.0.1f-1ubuntu2.19_amd64.deb ...
Unpacking libssl1.0.0:amd64 (1.0.1f-1ubuntu2.19) over (1.0.1f-1ubuntu2.18) ...
Preparing to unpack .../libtasn1-6_3.4-3ubuntu0.4_amd64.deb ...
Unpacking libtasn1-6:amd64 (3.4-3ubuntu0.4) over (3.4-3ubuntu0.3) ...
Preparing to unpack .../openssl_1.0.1f-1ubuntu2.19_amd64.deb ...
Unpacking openssl (1.0.1f-1ubuntu2.19) over (1.0.1f-1ubuntu2.18) ...
Setting up libssl1.0.0:amd64 (1.0.1f-1ubuntu2.19) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
Setting up libtasn1-6:amd64 (3.4-3ubuntu0.4) ...
Setting up openssl (1.0.1f-1ubuntu2.19) ...
Processing triggers for libc-bin (2.19-0ubuntu6.7) ...
---> f8457b11a015
Removing intermediate container dcba8aa68e4b
Successfully built f8457b11a015
Pushing the MobileFirst Server image to the IBM Containers registry..
The push refers to a repository [registry.ng.bluemix.net/ibm-mobilefirst-starter]
fcbc1e70f592: Preparing
784ac4102fe6: Preparing
1332f61cd024: Preparing
f331de4198c6: Preparing
6feb3a25f858: Preparing
9c79005b1e3a: Waiting
059f1e4b63e1: Waiting
b37c7f8a88ad: Waiting
f5bb59988dab: Waiting
cd56321d6e42: Waiting
e7e3593d35f6: Waiting
72ab77e1dc10: Waiting
abaf4fcb3d62: Waiting
8c7c5db80a80: Waiting
a273f11464af: Waiting
c01c75f5629b: Waiting
5f70bf18a086: Waiting
401bc57f3f9a: Waiting
186d27163349: Waiting
0e2036d62c18: Waiting
5412bb5f865f: Waiting
unauthorized: authentication required
4) startserver.sh - Run the image on an IBM Container
Suhas-iMac:scripts suhas$ ./startserver.sh
Specify the name of the MobileFirst Server image available in the Bluemix registry. Should be of form registryUrl/repositoryNamespace/name (mandatory) : registry.ng.bluemix.net/ibm-mobilefirst-starter
Specify the name of the container (mandatory) : Test1
Specify the IP address for the MobileFirst Server container (mandatory) : 169.44.13.134
Specify the Bluemix application name that should be bound to the container (optional) :
Expose HTTP Port. Accepted values are Y or N. The default value is Y. (optional) :
Expose HTTPS Port. Accepted values are Y or N. The default value is Y. (optional) :
Specify the memory size limit (in MB) for the MobileFirst Server container. Accepted values are 1024, 2048,... The default value is 1024 (optional) :
Enable SSH For the MobileFirst Server container. Accepted values are Y or N. The default value is Y. (optional) :
Provide an SSH Key to be injected into the container. Provide the contents of your id_rsa.pub file (optional):
Enable mounting volume for the MobileFirst Server container logs. Accepted values are Y or N. The default value is N (optional) :
Provide the Trace specification to be applied to the MobileFirst Server. The default value is *=info (optional):
Provide the maximum number of log files to maintain before overwriting them. The default value is 5 files. (optional):
Maximum size of a log file (in MB). The default value is 20 MB. (optional):
Specify related MobileFirst Platform Foundation properties as comma-separated key:value pairs (optional) :
Arguments :
-----------
SERVER_IMAGE_NAME : registry.ng.bluemix.net/ibm-mobilefirst-starter
SERVER_CONTAINER_NAME : Test1
SERVER_MEM : 1024
SERVER_IP : 169.44.13.134
APP_NAME :
EXPOSE_HTTP : Y
EXPOSE_HTTPS : Y
SSH_ENABLE : Y
ENABLE_VOLUME : N
SSH_KEY :
TRACE_SPEC :
MAX_LOG_FILES : 5
MAX_LOG_FILE_SIZE : 20
MFPF_PROPERTIES :
Starting the MobileFirst Server container : Test1
Executing command : cf ic run --name Test1 -m 1024 -p 169.44.13.134:22:22 -p 169.44.13.134:9080:9080 -p 169.44.13.134:9443:9443 -e TRACE_LEVEL=*~info -e MAX_LOG_FILES=5 -e MAX_LOG_FILE_SIZE=20 registry.ng.bluemix.net/ibm-mobilefirst-starter
25e6ed03-fb49-4426-b436-c0638b2e955e
Checking the status of the Container Test1 (id : 25e6ed03-fb49-4426-b436-c0638b2e955e) ...
MobileFirst Server Container has been created successfully and is in Running state
Checking the status of the public IP binding to the Container ...
Detailed Status of the container and the binding can be verified using the following cf ic command
cf ic inspect 25e6ed03-fb49-4426-b436-c0638b2e955e
Screenshot -

First thing you need to do is to define a SERVER_IMAGE_TAG in the right form as explained in Step 3: Using the configuration files.
The SERVER_IMAGE_TAG should be of the form: registry-url/namespace/your-tag.
You tried to build an image with a public image tag that already exist in the Bluemix repository: ibm-mobilefirst-starter, and that is the reason you got the error: "unauthorized: authentication required" message when the prepareserver.sh script tried to push this image to the repository.
Then, you used the startserver.sh script to run a container with the ibm-mobilefirst-starter public image instead of your own image. You cannot use the already published ibm-mobilefirst-starter image tag. You must use your own.

Related

Gitlab Runner auto CI stuck at downloading

Until now I worked a lot with github/bitbucket and jenkins/bamboo. Right now I'm trying to setup a Gitlab CE server with a private kubernetes cluster.
I want to run a hello world project in java with gitlabs AutoDevOps in kubernetes, this is the repo I'm using:
https://github.com/dstar55/docker-hello-world-spring-boot
Everything works fine until runner gets created in kubernetes, downloads the image but gets stuck on downloading maven resources.
Running on runner-h6cwaztm-project-8-concurrent-0jvd9f via runner-gitlab-runner-6dcf7dd458-jl69h...
Fetching changes with git depth set to 50...
00:02
Initialized empty Git repository in /builds/.../hello-world-spring/.git/
Created fresh repository.
From https://.../hello-world-spring
* [new ref] refs/pipelines/14 -> refs/pipelines/14
* [new branch] master -> origin/master
Checking out ad24ac6b as master...
Skipping Git submodules setup
$ if [[ -z "$CI_COMMIT_TAG" ]]; then # collapsed multi-line command
$ /build/build.sh
Logging to GitLab Container Registry with CI credentials...
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded
Building Dockerfile-based application...
Step 1/10 : FROM maven:3.5.2-jdk-8-alpine AS maven_build
3.5.2-jdk-8-alpine: Pulling from library/maven
22bc7fb81913: Pull complete
Digest: sha256:7cebda60f8a541e1bf2330306d22f9786f989187f4ec96539d398a0d4dbfdadb
Status: Downloaded newer image for maven:3.5.2-jdk-8-alpine
---> 293423a981a7
Step 2/10 : COPY pom.xml /tmp/
---> c0e609a509a8
Step 3/10 : COPY src /tmp/src/
---> e735a08f2b39
Step 4/10 : WORKDIR /tmp/
---> Running in 90620c0ca3ad
Removing intermediate container 90620c0ca3ad
---> a5d9fdc62aa9
Step 5/10 : RUN mvn package
---> Running in dc90f43fc83b
[INFO] Scanning for projects...
Downloading from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.2.1.RELEASE/spring-boot-starter-parent-2.2.1.RELEASE.pom
It never throws an error (until it timesout) and it never goes past this point.
Kubernetes has 4 nodes 1 master and 3 slaves, using flannel and MetalLB
Edit:
I added a curl command instead of mvn package and it seems the download speed is 0, how is that possible?
Step 5/11 : RUN curl https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.2.1.RELEASE/spring-boot-starter-parent-2.2.1.RELEASE.pom --output test.pom
---> Running in db2bc24c6a4f
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:05:00 --:--:-- 0
curl: (28) Operation timed out after 300689 milliseconds with 0 out of 0 bytes received
The command '/bin/sh -c curl https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.2.1.RELEASE/spring-boot-starter-parent-2.2.1.RELEASE.pom --output test.pom' returned a non-zero code: 28
ERROR: Job failed: command terminated with exit code 1
According to place where CI hangs, your pipeline stuck at mvn package:
Step 5/10 : RUN mvn package
---> Running in dc90f43fc83b
[INFO] Scanning for projects...
Downloading from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.2.1.RELEASE/spring-boot-starter-parent-2.2.1.RELEASE.pom
So, you can try to restart Artifactory.
Also, you can debug mvn packages with mvn clean package -X -e
See: this answer :
java - Maven hanging indefinitely while checking for updates - Stack Overflow
mvn clean package -X -e

Certbot SSL Certificate issue

I'm trying to install the package CertBot Certificate but the system gives me an error
Here is what happens while yum is executing:
ca-certificates-2019.2.32-76.el7_7.noarch.rpm | 399 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating : ca-certificates-2019.2.32-76.el7_7.noarch 1/2
Error unpacking rpm package ca-certificates-2019.2.32-76.el7_7.noarch
error: unpacking of archive failed on file /etc/ssl/certs: cpio: rename
Verifying : ca-certificates-2019.2.32-76.el7_7.noarch 1/2
ca-certificates-2018.2.22-70.0.el7_5.noarch was supposed to be removed but is not!
Verifying : ca-certificates-2018.2.22-70.0.el7_5.noarch 2/2
Failed:
ca-certificates.noarch 0:2018.2.22-70.0.el7_5 ca-certificates.noarch 0:2019.2.32-76.el7_7
Complete!
Could not install OS dependencies. Aborting bootstrap!
Anyone knows how to fix this?
I fixed by doing the following commands:
cd /etc/ssl
mv certs certs.saved
ln -s ../pki/tls/certs certs
After that the problem stopped happening and i was able to successfully install the certificate.
I had this issue in centos 7 server and this commands solved the error :
$ mv /etc/ssl/certs /etc/ssl/certs.back
$ ln -s /etc/pki/tls/certs /etc/ssl/certs
$ yum update ca-certificate*

How to fix "returned a non-zero code: 7" when building docker image

I'm a newer to Docker, when i follow https://docs.confluent.io/current/installation/docker/development.html#create-a-docker-image-containing-local-connectors to build a Docker image with local connector, i got some issue.
below is my Dockerfile:
FROM confluentinc/cp-kafka-connect-base:5.3.0
COPY kafka-connect-solr-sink-0.0.1.zip /tmp/kafka-connect-solr-sink-0.0.1.zip
RUN confluent-hub install --no-prompt /tmp/kafka-connect-solr-sink-0.0.1.zip
when I run "docker build . -t my-custom-image:1.0.0", got below error:
Sending build context to Docker daemon 6.876MB Step 1/3 : FROM
confluentinc/cp-kafka-connect-base:5.3.0 ---> b1491496b48d Step 2/3 :
COPY kafka-connect-solr-sink-0.0.1.zip
/tmp/kafka-connect-solr-sink-0.0.1.zip ---> Using cache --->
85689e66c40a Step 3/3 : RUN confluent-hub install --no-prompt
/tmp/kafka-connect-solr-sink-0.0.1.zip ---> Running in 1d3486732517
Running in a "--no-prompt" mode Failed to unzip
'/tmp/kafka-connect-solr-sink-0.0.1.zip' into
'/tmp/confluent-hub-tmp7724578044817786588' String index out of range:
-1
Error: Unknown error The command '/bin/sh -c confluent-hub install
--no-prompt /tmp/kafka-connect-solr-sink-0.0.1.zip' returned a non-zero code: 7
Anyone can kindly help on this? Thanks.
From the Docker file ,Ensure you set the required proxy settings so that you do not get this error.
In Dockerfile....
ENV http_proxy <proxy_host>:
ENV https_proxy <proxy_host>:
After adding this before running other commands it

Ceph Nautilus with step by step instruction to access existing CephFS cluster from Kubernetes pod

The most recent Ceph "Nautilus" release claims Kubernetes support in CephFS (not via RDB). It is not clear how to configure Kubernetes (without Rook) to get access to my CephFS cluster just like I can access NFS storage.
What I did:
1.Installed the Ceph cluster
2. Used examples from ceph-csi and wasn't able to configure pvc. Looks like I missed some steps (how to install the Ceph provisioner is not clear?). It doesn't work out of the box for me.
I used code from "ceph-csi/deploy/cephfs/kubernetes/" folder taken from GitHub.
error on compilation "external-storage"
kostya#kostya-ws:~/workspace/external-storage$ make
cd aws/efs; \
make container
make[1]: Entering directory '/home/kostya/workspace/external-storage/aws/efs'
docker build -t quay.io/external_storage/efs-provisioner:latest -f Dockerfile ../..
Sending build context to Docker daemon 57.97MB
Step 1/10 : FROM golang:1.11.1-alpine AS builder
---> 95ec94706ff6
Step 2/10 : ENV CGO_ENABLED=0
---> Using cache
---> d938b769a6f2
Step 3/10 : COPY vendor /go/src/github.com/kubernetes-incubator/external-storage/vendor
---> Using cache
---> 5b399a6c880f
Step 4/10 : COPY aws/efs /go/src/github.com/kubernetes-incubator/external-storage/aws/efs
---> Using cache
---> 6064356d3fd2
Step 5/10 : WORKDIR /go/src/github.com/kubernetes-incubator/external-storage/aws/efs
---> Using cache
---> e371476850c9
Step 6/10 : RUN go install ./cmd/efs-provisioner
---> Using cache
---> 84baa019ef76
Step 7/10 : FROM alpine:3.6
---> 43773d1dba76
Step 8/10 : RUN apk add --no-cache ca-certificates
---> Using cache
---> a324d62429a2
Step 9/10 : COPY --from=builder /go/bin/efs-provisioner /
---> Using cache
---> 6e1658c6dcd7
Step 10/10 : ENTRYPOINT ["/efs-provisioner"]
---> Using cache
---> f39741224126
Successfully built f39741224126
Successfully tagged quay.io/external_storage/efs-provisioner:latest
docker tag quay.io/external_storage/efs-provisioner:latest quay.io/external_storage/efs-provisioner:latest
make[1]: Leaving directory '/home/kostya/workspace/external-storage/aws/efs'
cd ceph/cephfs; \
make container
make[1]: Entering directory '/home/kostya/workspace/external-storage/ceph/cephfs'
CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o cephfs-provisioner cephfs-provisioner.go
cephfs-provisioner.go:30:2: cannot find package "github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/controller" in any of:
/usr/local/go/src/github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/controller (from $GOROOT)
/home/kostya/go/src/github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/controller (from $GOPATH)
cephfs-provisioner.go:31:2: cannot find package "github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/util" in any of:
/usr/local/go/src/github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/util (from $GOROOT)
/home/kostya/go/src/github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/util (from $GOPATH)
cephfs-provisioner.go:32:2: cannot find package "k8s.io/api/core/v1" in any of:
/usr/local/go/src/k8s.io/api/core/v1 (from $GOROOT)
/home/kostya/go/src/k8s.io/api/core/v1 (from $GOPATH)
cephfs-provisioner.go:33:2: cannot find package "k8s.io/apimachinery/pkg/apis/meta/v1" in any of:
/usr/local/go/src/k8s.io/apimachinery/pkg/apis/meta/v1 (from $GOROOT)
/home/kostya/go/src/k8s.io/apimachinery/pkg/apis/meta/v1 (from $GOPATH)
cephfs-provisioner.go:34:2: cannot find package "k8s.io/apimachinery/pkg/util/uuid" in any of:
/usr/local/go/src/k8s.io/apimachinery/pkg/util/uuid (from $GOROOT)
/home/kostya/go/src/k8s.io/apimachinery/pkg/util/uuid (from $GOPATH)
cephfs-provisioner.go:35:2: cannot find package "k8s.io/apimachinery/pkg/util/wait" in any of:
/usr/local/go/src/k8s.io/apimachinery/pkg/util/wait (from $GOROOT)
/home/kostya/go/src/k8s.io/apimachinery/pkg/util/wait (from $GOPATH)
cephfs-provisioner.go:36:2: cannot find package "k8s.io/client-go/kubernetes" in any of:
/usr/local/go/src/k8s.io/client-go/kubernetes (from $GOROOT)
/home/kostya/go/src/k8s.io/client-go/kubernetes (from $GOPATH)
cephfs-provisioner.go:37:2: cannot find package "k8s.io/client-go/rest" in any of:
/usr/local/go/src/k8s.io/client-go/rest (from $GOROOT)
/home/kostya/go/src/k8s.io/client-go/rest (from $GOPATH)
cephfs-provisioner.go:38:2: cannot find package "k8s.io/client-go/tools/clientcmd" in any of:
/usr/local/go/src/k8s.io/client-go/tools/clientcmd (from $GOROOT)
/home/kostya/go/src/k8s.io/client-go/tools/clientcmd (from $GOPATH)
cephfs-provisioner.go:39:2: cannot find package "k8s.io/klog" in any of:
/usr/local/go/src/k8s.io/klog (from $GOROOT)
/home/kostya/go/src/k8s.io/klog (from $GOPATH)
make[1]: *** [Makefile:27: build] Error 1
make[1]: Leaving directory '/home/kostya/workspace/external-storage/ceph/cephfs'
make: *** [Makefile:45: ceph/cephfs] Error 2

Hyperledger Fabric on Raspberry pi 3

I'm trying to deploy hyperledger fabric on a raspberry pi, but it doesn't work. I'm searching for some tutorial but i didn't found it, there are someone that just did it?
Last time I've tried to run Hyperledger Fabric on RPi I've prepared following instructions:
Install latest RASPBIAN on SD card, you can download image from:
https://www.raspberrypi.org/downloads/raspbian/
Update and upgrade latest by running:
sudo apt-get update && sudo apt-get upgrade -y
Install required dependencies:
sudo apt-get install git curl gcc libc6-dev libltdl3-dev python-setuptools -y
Upgrade python pip installer:
sudo -H pip install pip --upgrade
Install docker and docker compose:
curl -sSL get.docker.com | shsudo usermod -aG docker pisudo pip install docker-compose
Logout/Login terminal session, so changes will take effect.
Install golang, by following instructions from: https://golang.org/doc/install
Create golang directory:
mkdir -p /home/pi/golang && mkdir -p /home/pi/golang/src/github/hyperledger/
Define environment variable
export GOPATH=/home/pi/golang
Make sure go binaries are in the path, e.g.:
export PATH=/usr/local/go/bin:$PATH
Clone fabric-baseimage repository into /home/pi/golang/src/github/hyperledger/
git clone https://github.com/hyperledger/fabric-baseimage.git
Clone client fabric repository into /home/pi/golang/src/github/hyperledger/
git clone https://github.com/hyperledger/fabric.git
Build based docker images
cd ~/golang/src/github/hyperledger/fabric-baseimage && make docker-local
Apply following patch to fabric code base:
--- a/peer/core.yaml
+++ b/peer/core.yaml
## -68,7 +68,6 ## peer:
# Gossip related configuration
gossip:
- bootstrap: 127.0.0.1:7051
# Use automatically chosen peer (high avalibility) to distribute blocks in channel or static one
# Setting this true and orgLeader true cause panic exit
useLeaderElection: false
## -280,7 +279,7 ## vm:
Config:
max-size: "50m"
max-file: "5"
- Memory: 2147483648
+ Memory: 16777216
AND
--- a/core/container/util/dockerutil.go
+++ b/core/container/util/dockerutil.go
## -45,6 +45,7 ## func NewDockerClient() (client *docker.Client, err error) {
// and GOARCH here.
var archRemap = map[string]string{
"amd64": "x86_64",
+ "arm": "armv7l",
}
func getArch() string {
Build Hyperledger peer and
cd ~/golang/src/github/hyperledger/fabric && make clean peer peer-docker
Peer executable binary will appear in:
~/golang/src/github/hyperledger/fabric/build/bin/