我已经安装了 Rancher 2 并创建了一个内部虚拟机的 kubernetes 集群(没有 AWS / gcloud)。
集群已启动并正在运行。
我登录到其中一个节点。
1) 安装 Kubectl 并执行 kubectl cluster-info 。它正确列出了我的集群信息。
2) 安装的舵
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get > get_helm.sh
chmod 700 get_helm.sh
./get_helm.sh
root@lnmymachine # helm version
Client: &version.Version{SemVer:"v2.12.3", GitCommit:"eecf22f77df5f65c823aacd2dbd30ae6c65f186e", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.12.3", GitCommit:"eecf22f77df5f65c823aacd2dbd30ae6c65f186e", GitTreeState:"clean"}
Run Code Online (Sandbox Code Playgroud)
3) 配置 helm 引用Rancher Helm Init
kubectl -n kube-system create serviceaccount tiller
kubectl create clusterrolebinding tiller \
--clusterrole cluster-admin \
--serviceaccount=kube-system:tiller
helm init --service-account tiller
Run Code Online (Sandbox Code Playgroud)
尝试通过 helm 安装 Jenkins
root@lnmymachine # helm ls
Error: Unauthorized
root@lnmymachine # helm install …Run Code Online (Sandbox Code Playgroud) 我正在詹金斯建立一个gradle项目.我之前已广泛使用过Jenkins,但是使用了maven并且没有公司代理.
场景:1)公司代理背后的系统2)一个gradle项目,带有用于构建的gradle包装器.3)使用Jenkins Master(基于Linux)4)具有完整代理详细信息的gradle.properties文件.
因此,在这种情况下,由于我们有代理,因此我创建了gradle.properties,其中包含必要的代理详细信息并触发了jenkins构建.但是我在jenkins构建日志中看到了这个错误(或警告). 构建成功编译并创建一个jar文件.
任何关于为什么会发生这种情况以及任何解决方法/解决方案的想法.
我检查了这个,但解决方案无效.Gradle问题
我的gradle.properties的内容.
systemProp.http.proxyHost=somehost
systemProp.http.proxyPort=8080
systemProp.http.proxyUser=username
systemProp.http.proxyPassword=somepasswrd
systemProp.https.proxyHost=somehost
systemProp.https.proxyPort=8080
systemProp.https.proxyUser=username
systemProp.https.proxyPassword=somepasswrd
systemProp.http.nonProxyHosts=localhost|127.0.0.1
systemProp.http.keepAlive = true
Run Code Online (Sandbox Code Playgroud)
我正在尝试通过sonarqube分析java代码。我们在本地环境中创建了一个声纳库服务器,而不是使用声纳云。
我尝试使用 sonar maven 插件最初形成此链接Sonar-Maven Plugin
但是我遇到了“权限不足”错误。
[INFO] BUILD FAILURE [INFO]
------------------------------------------------------------------------ [INFO] Total time: 22.185 s [INFO] Finished at: 2017-09-18T13:04:47+10:00 [INFO] Final Memory: 64M/589M [INFO]
------------------------------------------------------------------------ [ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:
3.3.0.603:sonar (default-cli) on project testproject: Insufficient privileges -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o rg.sonarsource.scanner.maven:sonar-maven-plugin:3.3.0.603:sonar (default-cli) on project testproject: Insufficient privileges
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor .java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor .java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor .java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje ct(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje ct(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThre adedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl eStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309) …Run Code Online (Sandbox Code Playgroud) 我们已经开发了一个 Springboot Java 应用程序,我把它放在一个用于开发环境的 docker 容器上。
Spring 启动版本为 1.5.6
使用的 DB 是 SQL server 2016,它再次位于 docker(windows 容器)上。
问题: 每当我重新启动 SQL DB 容器时,应用程序就会开始出现此错误。
2018-10-29 16:00:08,993 ERROR pool-13-thread-1 org.springframework.scheduling.support.TaskUtils$LoggingErrorHandler - Unexpected error occurred in scheduled task.
org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed.
at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:431)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:373)
at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:447)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:277)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:136)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:133)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.data.repository.core.support.SurroundingTransactionDetectorMethodInterceptor.invoke(SurroundingTransactionDetectorMethodInterceptor.java:57)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用 nfs 为应用程序安装 NAS。存储团队已将其导出到主机服务器,我可以在 /nas/data 中访问它。
我正在使用容器化应用程序,这个文件系统导出到主机将是一个安全问题,因为主机上运行的任何容器都可以使用共享。所以这个 linux 到 linux 安装对我不起作用。
所以我唯一的替代解决方案是在容器启动期间使用用户名/密码挂载这个 nas 文件夹。
下面的命令在支持 Unix/Windows 的共享上运行良好。我可以在容器启动时挂载
mount -t cifs -osec=ntlmv2,domain=mydomain,username=svc_account,password=password,noserverino //nsnetworkshare.domain.company/share/folder /opt/testnas
Run Code Online (Sandbox Code Playgroud)
有人告诉我,我们应该使用 nfs 选项而不是 cifs。 所以只是试图找出使用 nfs 还是 cifs 会有所不同。
指定 nfs 选项会出现以下错误。
mount -t nfs -o nfsvers=3,domain=mydomain,username=svc_account,password=password,noserverino //nsnetworkshare.domain.company/share/folder /opt/testnas
mount.nfs: remote share not in 'host:dir' format
Run Code Online (Sandbox Code Playgroud)
下面的命令似乎也不起作用。
mount -t nfs -o nfsvers=3,domain=mydomain,username=svc_account,password=password,noserverino nsnetworkshare.domain.company:/share/folder /opt/testnas
mount.nfs: an incorrect mount option was specified
Run Code Online (Sandbox Code Playgroud)
我找不到带有用户名/密码的 mount -t nfs 选项示例。所以我认为我们不能将 mount -t nfs 与凭据一起使用。
请提出想法。
谢谢,
毗湿奴
我需要并行执行作业,并遇到了这个名为 MultiJob plugin for Jenkins 的插件。
通过文档后,我创建了阶段并给出了工作名称。但是我基本上在哪里创建作业。我的意思是作业“TaskToExecute1”和“TasktoExecute2”的脚本、构建步骤和后期构建步骤。
jenkins ×2
docker ×1
gradle ×1
java ×1
kubernetes ×1
nfs ×1
ntlm ×1
proxy ×1
rancher ×1
sonar-runner ×1
sonarqube ×1
spring-boot ×1