Version updates, readme fixes, manifest fixes, env. for argo's container runtime executor and bug fixes for Okteto dev. env. setup. (#2717)
* fix for frontend svc port on okteto * fix for prod. frontend svc port on okteto * adding missing envs. * update to cluster scope. * fixed bugs and added env for container runtime executor * fixes and updates. * added the portal_scope env back and minor readme update. * minor fix Signed-off-by: ishangupta-ds <ishan@chaosnative.com>
This commit is contained in:
parent
46e71aebfc
commit
c947580814
|
@ -201,3 +201,4 @@ spec:
|
|||
selector:
|
||||
component: database
|
||||
---
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ spec:
|
|||
app: chaos-exporter
|
||||
spec:
|
||||
containers:
|
||||
- image: litmuschaos/chaos-exporter:1.13.0
|
||||
- image: litmuschaos/chaos-exporter:1.13.3
|
||||
imagePullPolicy: Always
|
||||
name: chaos-exporter
|
||||
serviceAccountName: litmus
|
||||
|
|
|
@ -181,6 +181,8 @@ spec:
|
|||
value: "false"
|
||||
- name: INGRESS_NAME
|
||||
value: "litmus-ingress"
|
||||
- name: CONTAINER_RUNTIME_EXECUTOR
|
||||
value: "k8sapi"
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
imagePullPolicy: Always
|
||||
|
|
|
@ -126,10 +126,6 @@ spec:
|
|||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
- name: PORTAL_SCOPE
|
||||
value: "namespace"
|
||||
- name: PORTAL_ENDPOINT
|
||||
value: "http://litmusportal-server-service:9002"
|
||||
- name: SELF_CLUSTER
|
||||
value: "true"
|
||||
- name: AGENT_SCOPE
|
||||
|
@ -152,6 +148,10 @@ spec:
|
|||
configMapKeyRef:
|
||||
name: litmus-portal-admin-config
|
||||
key: DB_PASSWORD
|
||||
- name: PORTAL_SCOPE
|
||||
value: "namespace"
|
||||
- name: PORTAL_ENDPOINT
|
||||
value: "http://litmusportal-server-service:9002"
|
||||
- name: SUBSCRIBER_IMAGE
|
||||
value: "litmuschaos/litmusportal-subscriber:2.0.0-Beta3"
|
||||
- name: EVENT_TRACKER_IMAGE
|
||||
|
@ -168,6 +168,8 @@ spec:
|
|||
value: "litmuschaos/chaos-runner:1.13.3"
|
||||
- name: LITMUS_CHAOS_EXPORTER_IMAGE
|
||||
value: "litmuschaos/chaos-exporter:1.13.3"
|
||||
- name: CONTAINER_RUNTIME_EXECUTOR
|
||||
value: "k8sapi"
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
imagePullPolicy: Always
|
||||
|
|
|
@ -181,6 +181,8 @@ spec:
|
|||
value: "false"
|
||||
- name: INGRESS_NAME
|
||||
value: "litmus-ingress"
|
||||
- name: CONTAINER_RUNTIME_EXECUTOR
|
||||
value: "k8sapi"
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
imagePullPolicy: Always
|
||||
|
|
|
@ -3199,7 +3199,7 @@ func (ec *executionContext) introspectType(name string) (*introspection.Type, er
|
|||
}
|
||||
|
||||
var sources = []*ast.Source{
|
||||
&ast.Source{Name: "graph/analytics.graphqls", Input: `input DSInput {
|
||||
{Name: "graph/analytics.graphqls", Input: `input DSInput {
|
||||
ds_id: String
|
||||
ds_name: String!
|
||||
ds_type: String!
|
||||
|
@ -3375,7 +3375,7 @@ input deleteDSInput {
|
|||
force_delete: Boolean!
|
||||
ds_id: String!
|
||||
}`, BuiltIn: false},
|
||||
&ast.Source{Name: "graph/myhub.graphqls", Input: `enum AuthType {
|
||||
{Name: "graph/myhub.graphqls", Input: `enum AuthType {
|
||||
none
|
||||
basic
|
||||
token
|
||||
|
@ -3549,7 +3549,7 @@ input UpdateMyHub {
|
|||
SSHPublicKey: String
|
||||
}
|
||||
`, BuiltIn: false},
|
||||
&ast.Source{Name: "graph/project.graphqls", Input: `type Project {
|
||||
{Name: "graph/project.graphqls", Input: `type Project {
|
||||
id: ID!
|
||||
name: String!
|
||||
members: [Member!]!
|
||||
|
@ -3581,7 +3581,7 @@ enum MemberRole {
|
|||
Viewer
|
||||
}
|
||||
`, BuiltIn: false},
|
||||
&ast.Source{Name: "graph/schema.graphqls", Input: `# GraphQL schema example
|
||||
{Name: "graph/schema.graphqls", Input: `# GraphQL schema example
|
||||
#
|
||||
# https://gqlgen.com/getting-started/
|
||||
|
||||
|
@ -4015,7 +4015,7 @@ type Subscription {
|
|||
getKubeObject(kubeObjectRequest: KubeObjectRequest!): KubeObjectResponse! @authorized
|
||||
}
|
||||
`, BuiltIn: false},
|
||||
&ast.Source{Name: "graph/usermanagement.graphqls", Input: `type User {
|
||||
{Name: "graph/usermanagement.graphqls", Input: `type User {
|
||||
id: ID!
|
||||
username: String!
|
||||
email: String
|
||||
|
|
|
@ -6,6 +6,6 @@ metadata:
|
|||
namespace: #{AGENT-NAMESPACE}
|
||||
data:
|
||||
config: |
|
||||
containerRuntimeExecutor: k8sapi
|
||||
containerRuntimeExecutor: #{ARGO-CONTAINER-RUNTIME-EXECUTOR}
|
||||
executor:
|
||||
imagePullPolicy: Always
|
||||
imagePullPolicy: Always
|
||||
|
|
|
@ -8,7 +8,7 @@ metadata:
|
|||
app.kubernetes.io/name: litmus
|
||||
# provide unique instance-id if applicable
|
||||
# app.kubernetes.io/instance: litmus-abcxzy
|
||||
app.kubernetes.io/version: v1.12.0
|
||||
app.kubernetes.io/version: v1.13.3
|
||||
app.kubernetes.io/component: operator-serviceaccount
|
||||
app.kubernetes.io/part-of: litmus
|
||||
app.kubernetes.io/managed-by: kubectl
|
||||
|
@ -22,33 +22,53 @@ metadata:
|
|||
app.kubernetes.io/name: litmus
|
||||
# provide unique instance-id if applicable
|
||||
# app.kubernetes.io/instance: litmus-abcxzy
|
||||
app.kubernetes.io/version: v1.12.0
|
||||
app.kubernetes.io/version: v1.13.3
|
||||
app.kubernetes.io/component: operator-clusterrole
|
||||
app.kubernetes.io/part-of: litmus
|
||||
app.kubernetes.io/managed-by: kubectl
|
||||
name: litmus-cluster-scope
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["replicationcontrollers","secrets"]
|
||||
verbs: ["get","list"]
|
||||
resources: ["replicationcontrollers", "secrets"]
|
||||
verbs: ["get", "list"]
|
||||
- apiGroups: ["apps.openshift.io"]
|
||||
resources: ["deploymentconfigs"]
|
||||
verbs: ["get","list"]
|
||||
verbs: ["get", "list"]
|
||||
- apiGroups: ["apps"]
|
||||
resources: ["deployments", "daemonsets", "replicasets", "statefulsets"]
|
||||
verbs: ["get","list"]
|
||||
verbs: ["get", "list"]
|
||||
- apiGroups: ["batch"]
|
||||
resources: ["jobs"]
|
||||
verbs: ["get","list","deletecollection"]
|
||||
verbs: ["get", "list", "deletecollection"]
|
||||
- apiGroups: ["argoproj.io"]
|
||||
resources: ["rollouts"]
|
||||
verbs: ["get","list"]
|
||||
verbs: ["get", "list"]
|
||||
- apiGroups: [""]
|
||||
resources: ["pods","configmaps","events","services"]
|
||||
verbs: ["get","create","update","patch","delete","list","watch","deletecollection"]
|
||||
resources: ["pods", "configmaps", "events", "services"]
|
||||
verbs:
|
||||
[
|
||||
"get",
|
||||
"create",
|
||||
"update",
|
||||
"patch",
|
||||
"delete",
|
||||
"list",
|
||||
"watch",
|
||||
"deletecollection",
|
||||
]
|
||||
- apiGroups: ["litmuschaos.io"]
|
||||
resources: ["chaosengines","chaosexperiments","chaosresults"]
|
||||
verbs: ["get","create","update","patch","delete","list","watch","deletecollection"]
|
||||
resources: ["chaosengines", "chaosexperiments", "chaosresults"]
|
||||
verbs:
|
||||
[
|
||||
"get",
|
||||
"create",
|
||||
"update",
|
||||
"patch",
|
||||
"delete",
|
||||
"list",
|
||||
"watch",
|
||||
"deletecollection",
|
||||
]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
|
@ -58,7 +78,7 @@ metadata:
|
|||
app.kubernetes.io/name: litmus
|
||||
# provide unique instance-id if applicable
|
||||
# app.kubernetes.io/instance: litmus-abcxzy
|
||||
app.kubernetes.io/version: v1.12.0
|
||||
app.kubernetes.io/version: v1.13.3
|
||||
app.kubernetes.io/component: operator-clusterrolebinding
|
||||
app.kubernetes.io/part-of: litmus
|
||||
app.kubernetes.io/managed-by: kubectl
|
||||
|
@ -70,4 +90,4 @@ roleRef:
|
|||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: litmus-cluster-scope
|
||||
namespace: #{AGENT-NAMESPACE}
|
||||
namespace: #{AGENT-NAMESPACE}
|
||||
|
|
|
@ -6,7 +6,7 @@ metadata:
|
|||
app.kubernetes.io/name: litmus
|
||||
# provide unique instance-id if applicable
|
||||
# app.kubernetes.io/instance: litmus-abcxzy
|
||||
app.kubernetes.io/version: v1.12.0
|
||||
app.kubernetes.io/version: v1.13.3
|
||||
app.kubernetes.io/component: operator
|
||||
app.kubernetes.io/part-of: litmus
|
||||
app.kubernetes.io/managed-by: kubectl
|
||||
|
|
|
@ -6,10 +6,10 @@ metadata:
|
|||
namespace: #{AGENT-NAMESPACE}
|
||||
data:
|
||||
config: |
|
||||
containerRuntimeExecutor: k8sapi
|
||||
containerRuntimeExecutor: #{ARGO-CONTAINER-RUNTIME-EXECUTOR}
|
||||
executor:
|
||||
imagePullPolicy: Always
|
||||
resources:
|
||||
limits:
|
||||
cpu: 0.15
|
||||
memory: 512Mi
|
||||
memory: 512Mi
|
||||
|
|
|
@ -8,7 +8,7 @@ metadata:
|
|||
app.kubernetes.io/name: litmus
|
||||
# provide unique instance-id if applicable
|
||||
# app.kubernetes.io/instance: litmus-abcxzy
|
||||
app.kubernetes.io/version: v1.12.0
|
||||
app.kubernetes.io/version: v1.13.3
|
||||
app.kubernetes.io/component: operator-serviceaccount
|
||||
app.kubernetes.io/part-of: litmus
|
||||
app.kubernetes.io/managed-by: kubectl
|
||||
|
@ -23,33 +23,53 @@ metadata:
|
|||
app.kubernetes.io/name: litmus
|
||||
# provide unique instance-id if applicable
|
||||
# app.kubernetes.io/instance: litmus-abcxzy
|
||||
app.kubernetes.io/version: v1.12.0
|
||||
app.kubernetes.io/version: v1.13.3
|
||||
app.kubernetes.io/component: operator-role
|
||||
app.kubernetes.io/part-of: litmus
|
||||
app.kubernetes.io/managed-by: kubectl
|
||||
name: litmus-namespace-scope
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["replicationcontrollers","secrets"]
|
||||
verbs: ["get","list"]
|
||||
- apiGroups: ["apps.openshift.io"]
|
||||
resources: ["deploymentconfigs"]
|
||||
verbs: ["get","list"]
|
||||
- apiGroups: ["apps"]
|
||||
resources: ["deployments", "daemonsets", "replicasets", "statefulsets"]
|
||||
verbs: ["get","list","update"]
|
||||
- apiGroups: ["batch"]
|
||||
resources: ["jobs"]
|
||||
verbs: ["get","list","create","deletecollection"]
|
||||
- apiGroups: ["argoproj.io"]
|
||||
resources: ["rollouts"]
|
||||
verbs: ["get","list"]
|
||||
- apiGroups: [""]
|
||||
resources: ["pods","pods/exec","configmaps","events","services"]
|
||||
verbs: ["get","create","update","patch","delete","list","watch","deletecollection"]
|
||||
- apiGroups: ["litmuschaos.io"]
|
||||
resources: ["chaosengines","chaosexperiments","chaosresults"]
|
||||
verbs: ["get","create","update","patch","delete","list","watch","deletecollection"]
|
||||
- apiGroups: [""]
|
||||
resources: ["replicationcontrollers", "secrets"]
|
||||
verbs: ["get", "list"]
|
||||
- apiGroups: ["apps.openshift.io"]
|
||||
resources: ["deploymentconfigs"]
|
||||
verbs: ["get", "list"]
|
||||
- apiGroups: ["apps"]
|
||||
resources: ["deployments", "daemonsets", "replicasets", "statefulsets"]
|
||||
verbs: ["get", "list", "update"]
|
||||
- apiGroups: ["batch"]
|
||||
resources: ["jobs"]
|
||||
verbs: ["get", "list", "create", "deletecollection"]
|
||||
- apiGroups: ["argoproj.io"]
|
||||
resources: ["rollouts"]
|
||||
verbs: ["get", "list"]
|
||||
- apiGroups: [""]
|
||||
resources: ["pods", "pods/exec", "configmaps", "events", "services"]
|
||||
verbs:
|
||||
[
|
||||
"get",
|
||||
"create",
|
||||
"update",
|
||||
"patch",
|
||||
"delete",
|
||||
"list",
|
||||
"watch",
|
||||
"deletecollection",
|
||||
]
|
||||
- apiGroups: ["litmuschaos.io"]
|
||||
resources: ["chaosengines", "chaosexperiments", "chaosresults"]
|
||||
verbs:
|
||||
[
|
||||
"get",
|
||||
"create",
|
||||
"update",
|
||||
"patch",
|
||||
"delete",
|
||||
"list",
|
||||
"watch",
|
||||
"deletecollection",
|
||||
]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
kind: RoleBinding
|
||||
|
@ -60,7 +80,7 @@ metadata:
|
|||
app.kubernetes.io/name: litmus
|
||||
# provide unique instance-id if applicable
|
||||
# app.kubernetes.io/instance: litmus-abcxzy
|
||||
app.kubernetes.io/version: v1.12.0
|
||||
app.kubernetes.io/version: v1.13.3
|
||||
app.kubernetes.io/component: operator-rolebinding
|
||||
app.kubernetes.io/part-of: litmus
|
||||
app.kubernetes.io/managed-by: kubectl
|
||||
|
@ -72,4 +92,4 @@ roleRef:
|
|||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: litmus-namespace-scope
|
||||
namespace: #{AGENT-NAMESPACE}
|
||||
namespace: #{AGENT-NAMESPACE}
|
||||
|
|
|
@ -6,7 +6,7 @@ metadata:
|
|||
app.kubernetes.io/name: litmus
|
||||
# provide unique instance-id if applicable
|
||||
# app.kubernetes.io/instance: litmus-abcxzy
|
||||
app.kubernetes.io/version: v1.12.0
|
||||
app.kubernetes.io/version: v1.13.3
|
||||
app.kubernetes.io/component: operator
|
||||
app.kubernetes.io/part-of: litmus
|
||||
app.kubernetes.io/managed-by: kubectl
|
||||
|
|
|
@ -15,16 +15,17 @@ import (
|
|||
)
|
||||
|
||||
var subscriberConfiguration = &types.SubscriberConfigurationVars{
|
||||
AgentNamespace: os.Getenv("AGENT_NAMESPACE"),
|
||||
AgentScope: os.Getenv("AGENT_SCOPE"),
|
||||
SubscriberImage: os.Getenv("SUBSCRIBER_IMAGE"),
|
||||
EventTrackerImage: os.Getenv("EVENT_TRACKER_IMAGE"),
|
||||
ArgoServerImage: os.Getenv("ARGO_SERVER_IMAGE"),
|
||||
WorkflowControllerImage: os.Getenv("ARGO_WORKFLOW_CONTROLLER_IMAGE"),
|
||||
ChaosOperatorImage: os.Getenv("LITMUS_CHAOS_OPERATOR_IMAGE"),
|
||||
WorkflowExecutorImage: os.Getenv("ARGO_WORKFLOW_EXECUTOR_IMAGE"),
|
||||
ChaosRunnerImage: os.Getenv("LITMUS_CHAOS_RUNNER_IMAGE"),
|
||||
ChaosExporterImage: os.Getenv("LITMUS_CHAOS_EXPORTER_IMAGE"),
|
||||
AgentNamespace: os.Getenv("AGENT_NAMESPACE"),
|
||||
AgentScope: os.Getenv("AGENT_SCOPE"),
|
||||
SubscriberImage: os.Getenv("SUBSCRIBER_IMAGE"),
|
||||
EventTrackerImage: os.Getenv("EVENT_TRACKER_IMAGE"),
|
||||
ArgoServerImage: os.Getenv("ARGO_SERVER_IMAGE"),
|
||||
WorkflowControllerImage: os.Getenv("ARGO_WORKFLOW_CONTROLLER_IMAGE"),
|
||||
ChaosOperatorImage: os.Getenv("LITMUS_CHAOS_OPERATOR_IMAGE"),
|
||||
WorkflowExecutorImage: os.Getenv("ARGO_WORKFLOW_EXECUTOR_IMAGE"),
|
||||
ChaosRunnerImage: os.Getenv("LITMUS_CHAOS_RUNNER_IMAGE"),
|
||||
ChaosExporterImage: os.Getenv("LITMUS_CHAOS_EXPORTER_IMAGE"),
|
||||
ContainerRuntimeExecutor: os.Getenv("CONTAINER_RUNTIME_EXECUTOR"),
|
||||
}
|
||||
|
||||
// FileHandler dynamically generates the manifest file and sends it as a response
|
||||
|
@ -62,7 +63,7 @@ func GetManifest(token string) ([]byte, int, error) {
|
|||
return nil, 500, err
|
||||
}
|
||||
} else if os.Getenv("PORTAL_SCOPE") == "namespace" {
|
||||
subscriberConfiguration.GQLServerURI = os.Getenv("PORTAL_ENDPOINT")
|
||||
subscriberConfiguration.GQLServerURI = os.Getenv("PORTAL_ENDPOINT") + "/query"
|
||||
}
|
||||
|
||||
if !reqCluster.IsRegistered {
|
||||
|
|
|
@ -2,15 +2,16 @@ package types
|
|||
|
||||
// SubscriberConfigurationVars contains the required configurable parameters for subscriber installation
|
||||
type SubscriberConfigurationVars struct {
|
||||
AgentNamespace string
|
||||
AgentScope string
|
||||
GQLServerURI string
|
||||
SubscriberImage string
|
||||
EventTrackerImage string
|
||||
ArgoServerImage string
|
||||
WorkflowControllerImage string
|
||||
ChaosOperatorImage string
|
||||
WorkflowExecutorImage string
|
||||
ChaosRunnerImage string
|
||||
ChaosExporterImage string
|
||||
AgentNamespace string
|
||||
AgentScope string
|
||||
GQLServerURI string
|
||||
SubscriberImage string
|
||||
EventTrackerImage string
|
||||
ArgoServerImage string
|
||||
WorkflowControllerImage string
|
||||
ChaosOperatorImage string
|
||||
WorkflowExecutorImage string
|
||||
ChaosRunnerImage string
|
||||
ChaosExporterImage string
|
||||
ContainerRuntimeExecutor string
|
||||
}
|
||||
|
|
|
@ -25,13 +25,11 @@ import (
|
|||
|
||||
const defaultPort = "8080"
|
||||
|
||||
var err error
|
||||
|
||||
func init() {
|
||||
log.Printf("Go Version: %s", runtime.Version())
|
||||
log.Printf("Go OS/Arch: %s/%s", runtime.GOOS, runtime.GOARCH)
|
||||
|
||||
if os.Getenv("LITMUS_CHAOS_RUNNER_IMAGE") == "" || os.Getenv("LITMUS_CHAOS_OPERATOR_IMAGE") == "" || os.Getenv("SUBSCRIBER_IMAGE") == "" || os.Getenv("ARGO_SERVER_IMAGE") == "" || os.Getenv("ARGO_WORKFLOW_EXECUTOR_IMAGE") == "" || os.Getenv("ARGO_WORKFLOW_EXECUTOR_IMAGE") == "" || os.Getenv("JWT_SECRET") == "" || os.Getenv("PORTAL_SCOPE") == "" {
|
||||
if os.Getenv("DB_SERVER") == "" || os.Getenv("JWT_SECRET") == "" || os.Getenv("SELF_CLUSTER") == "" || os.Getenv("AGENT_SCOPE") == "" || os.Getenv("AGENT_NAMESPACE") == "" || os.Getenv("LITMUS_PORTAL_NAMESPACE") == "" || os.Getenv("DB_USER") == "" || os.Getenv("DB_PASSWORD") == "" || os.Getenv("PORTAL_SCOPE") == "" || os.Getenv("SUBSCRIBER_IMAGE") == "" || os.Getenv("EVENT_TRACKER_IMAGE") == "" || os.Getenv("ARGO_SERVER_IMAGE") == "" || os.Getenv("ARGO_WORKFLOW_CONTROLLER_IMAGE") == "" || os.Getenv("ARGO_WORKFLOW_EXECUTOR_IMAGE") == "" || os.Getenv("LITMUS_CHAOS_OPERATOR_IMAGE") == "" || os.Getenv("LITMUS_CHAOS_RUNNER_IMAGE") == "" || os.Getenv("LITMUS_CHAOS_EXPORTER_IMAGE") == "" || os.Getenv("CONTAINER_RUNTIME_EXECUTOR") == "" {
|
||||
log.Fatal("Some environment variable are not setup")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -107,6 +107,7 @@ func ManifestParser(cluster dbSchemaCluster.Cluster, rootPath string, subscriber
|
|||
newContent = strings.Replace(newContent, "#{ARGO-WORKFLOW-EXECUTOR}", subscriberConfig.WorkflowExecutorImage, -1)
|
||||
newContent = strings.Replace(newContent, "#{LITMUS-CHAOS-RUNNER}", subscriberConfig.ChaosRunnerImage, -1)
|
||||
newContent = strings.Replace(newContent, "#{LITMUS-CHAOS-EXPORTER}", subscriberConfig.ChaosExporterImage, -1)
|
||||
newContent = strings.Replace(newContent, "#{ARGO-CONTAINER-RUNTIME-EXECUTOR}", subscriberConfig.ContainerRuntimeExecutor, -1)
|
||||
|
||||
generatedYAML = append(generatedYAML, newContent)
|
||||
}
|
||||
|
|
|
@ -126,10 +126,6 @@ spec:
|
|||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
- name: PORTAL_SCOPE
|
||||
value: "namespace"
|
||||
- name: PORTAL_ENDPOINT
|
||||
value: "http://litmusportal-server-service:9002"
|
||||
- name: SELF_CLUSTER
|
||||
value: "true"
|
||||
- name: AGENT_SCOPE
|
||||
|
@ -152,6 +148,10 @@ spec:
|
|||
configMapKeyRef:
|
||||
name: litmus-portal-admin-config
|
||||
key: DB_PASSWORD
|
||||
- name: PORTAL_SCOPE
|
||||
value: "namespace"
|
||||
- name: PORTAL_ENDPOINT
|
||||
value: "http://litmusportal-server-service:9002"
|
||||
- name: SUBSCRIBER_IMAGE
|
||||
value: "litmuschaos/litmusportal-subscriber:ci"
|
||||
- name: EVENT_TRACKER_IMAGE
|
||||
|
@ -168,6 +168,8 @@ spec:
|
|||
value: "litmuschaos/chaos-runner:1.13.3"
|
||||
- name: LITMUS_CHAOS_EXPORTER_IMAGE
|
||||
value: "litmuschaos/chaos-exporter:1.13.3"
|
||||
- name: CONTAINER_RUNTIME_EXECUTOR
|
||||
value: "k8sapi"
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
imagePullPolicy: Always
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
# Litmus Portal development environment setup for Okteto cloud
|
||||
|
||||
This directory contains setup guide to start developing Litmus Portal on Okteto cloud.
|
||||
|
||||
This directory contains setup guide to start developing Litmus Portal on Okteto cloud.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Install `kubectl` for `kubernetes` from [here](https://kubernetes.io/docs/tasks/tools/install-kubectl)
|
||||
|
||||
- Create an Okteto cloud account and install the Okteto CLI from [here](https://okteto.com)
|
||||
|
||||
|
||||
For MAC/Linux:
|
||||
|
||||
```bash
|
||||
|
@ -42,11 +41,10 @@ This directory contains setup guide to start developing Litmus Portal on Okteto
|
|||
git checkout dev
|
||||
```
|
||||
|
||||
|
||||
## Instructions
|
||||
|
||||
- <h4>STEP-1:</h4> Switch to `dev` branch from GitHub UI and click the `Develop on Okteto` button below to deploy litmus-portal on Okteto cloud and start developing.
|
||||
|
||||
|
||||
[](https://cloud.okteto.com/deploy)
|
||||
|
||||
- <h4>STEP-2:</h4> Login to Okteto cloud using the CLI to download your kubernetes credentials.
|
||||
|
@ -66,36 +64,40 @@ This directory contains setup guide to start developing Litmus Portal on Okteto
|
|||
- <h4>STEP-4:</h4> Start the selected component's service on its container to start developing and get the changes reflected on deployed litmus-portal component which can be accessed from Okteto UI or from `https://<service name>-<okteto-namespace>.cloud.okteto.net`. This may take several minutes to start running inside the docker container. Add the given `if block` after changing `<okteto-namespace>` with your GitHub username to `litmus-portal/frontend/src/config/index.ts` file just before the `export default` statement. Then enter username as `admin` and password as `litmus` to login from the UI.
|
||||
|
||||
> `<okteto-namespace>`:litmusportal-frontend app>
|
||||
|
||||
```bash
|
||||
npm install && npm audit fix && cd src && npm start
|
||||
```
|
||||
|
||||
> Use your IDE or code editor to add the given `if block` after changing `<okteto-namespace>` with your GitHub username to `litmus-portal/frontend/src/config/index.ts` file just before the `export default` statement. <h5>Must be done before login.</h5>
|
||||
|
||||
```js
|
||||
if (loc.href.includes('cloud.okteto.net')) {
|
||||
if (loc.href.includes("cloud.okteto.net")) {
|
||||
authURL =
|
||||
'https://litmusportal-production-frontend-service-<okteto-namespace>.cloud.okteto.net/auth';
|
||||
"https://litmusportal-production-frontend-service-<okteto-namespace>.cloud.okteto.net/auth";
|
||||
apiURL =
|
||||
'https://litmusportal-production-frontend-service-<okteto-namespace>.cloud.okteto.net/api';
|
||||
"https://litmusportal-production-frontend-service-<okteto-namespace>.cloud.okteto.net/api";
|
||||
sockURL = `wss://litmusportal-production-frontend-service-<okteto-namespace>.cloud.okteto.net/ws`;
|
||||
}
|
||||
```
|
||||
|
||||
> login as default user with username as `admin` and password as `litmus` from the browser via `https://litmusportal-frontend-service-<okteto-namespace>.cloud.okteto.net` replacing `<okteto-namespace>` with your GitHub username.
|
||||
|
||||
- <h4>STEP-5:</h4> Schedule a chaos workflow from frontend selecting `namespaced-scope-chaos` from predefined workflow templates. Also replace the `adminModeNamespace` parameter's value field `litmus` with your GitHub username using the Yaml editor while scheduling. Now, you can start developing.
|
||||
- <h4>STEP-5:</h4> Schedule a chaos workflow by constructing one using `pod-delete` experiment from ChaosHub. Also replace the `adminModeNamespace` parameter's value field `litmus` with your GitHub username using the Yaml editor while scheduling. The `namespace:` field from workflow's metadata must be deleted using the yaml editor, `appns: '<GitHub-username>'` and `applabel: 'app=hello-world'` should be provided to the Chaos Engine in the constructed workflow. Now, you can start developing.
|
||||
|
||||
- <h4>STEP-6:</h4> After you are done with the code changes, you may stop the development environment using `okteto down` and go to the `litmus-portal/frontend/src/config` directory of the cloned repository on `dev` branch from IDE or code editor and delete the `if block` which was added for okteto dev env setup from `index.ts` file. Then change to the root directory of the cloned repository i.e. `litmus` and push the changes to your fork's `dev` branch.
|
||||
|
||||
> Exit the process and the container. Stop it using the given commands in sequence.
|
||||
|
||||
```bash
|
||||
exit && exit
|
||||
okteto down
|
||||
```
|
||||
|
||||
|
||||
> Go to `litmus-portal/frontend/src/config` directory of the clone from your IDE or code editor and delete the added `if block` for okteto env setup from `index.ts` file.
|
||||
|
||||
> Change to the root directory of the cloned repository i.e. `litmus` and push the changes to your fork's `dev` branch.
|
||||
|
||||
```bash
|
||||
cd ../..
|
||||
git add .
|
||||
|
@ -105,7 +107,6 @@ This directory contains setup guide to start developing Litmus Portal on Okteto
|
|||
|
||||
- <h4>STEP-7:</h4> Raise a pull request from the `dev` branch in your fork to https://github.com/litmuschaos/litmus using GitHub UI after pushing all the changes.
|
||||
|
||||
|
||||
## Debugging
|
||||
|
||||
- Delete all configmaps after cleaning up your Okteto cloud namespace or deleting Litmus Portal components.
|
||||
|
@ -128,7 +129,6 @@ This directory contains setup guide to start developing Litmus Portal on Okteto
|
|||
|
||||
- If `No cluster is registered with the selected projectID` message is displayed, select a project from header's project list dropdown.
|
||||
|
||||
|
||||
## Optional
|
||||
|
||||
- To compare the changes made during development phase with the actual production code you can visit `https://litmusportal-production-frontend-service-<okteto-namespace>.cloud.okteto.net` after replacing `<okteto-namespace>` with your GitHub username.
|
||||
|
|
|
@ -46,7 +46,7 @@ spec:
|
|||
ports:
|
||||
- name: http
|
||||
port: 9091
|
||||
targetPort: 80
|
||||
targetPort: 8080
|
||||
selector:
|
||||
component: litmusportal-frontend
|
||||
---
|
||||
|
@ -127,10 +127,6 @@ spec:
|
|||
key: JWTSecret
|
||||
- name: LITMUS_PORTAL_NAMESPACE
|
||||
value: ${OKTETO_NAMESPACE}
|
||||
- name: PORTAL_SCOPE
|
||||
value: "namespace"
|
||||
- name: PORTAL_ENDPOINT
|
||||
value: "http://litmusportal-server-service:9002"
|
||||
- name: SELF_CLUSTER
|
||||
value: "true"
|
||||
- name: AGENT_SCOPE
|
||||
|
@ -153,8 +149,14 @@ spec:
|
|||
configMapKeyRef:
|
||||
name: litmus-portal-admin-config
|
||||
key: DB_PASSWORD
|
||||
- name: PORTAL_SCOPE
|
||||
value: "namespace"
|
||||
- name: PORTAL_ENDPOINT
|
||||
value: "http://litmusportal-server-service:9002"
|
||||
- name: SUBSCRIBER_IMAGE
|
||||
value: "litmuschaos/litmusportal-subscriber:ci"
|
||||
- name: EVENT_TRACKER_IMAGE
|
||||
value: "litmuschaos/litmusportal-event-tracker:ci"
|
||||
- name: ARGO_SERVER_IMAGE
|
||||
value: "argoproj/argocli:v2.9.3"
|
||||
- name: ARGO_WORKFLOW_CONTROLLER_IMAGE
|
||||
|
@ -162,11 +164,13 @@ spec:
|
|||
- name: ARGO_WORKFLOW_EXECUTOR_IMAGE
|
||||
value: "argoproj/argoexec:v2.9.3"
|
||||
- name: LITMUS_CHAOS_OPERATOR_IMAGE
|
||||
value: "litmuschaos/chaos-operator:1.13.0"
|
||||
value: "litmuschaos/chaos-operator:1.13.3"
|
||||
- name: LITMUS_CHAOS_RUNNER_IMAGE
|
||||
value: "litmuschaos/chaos-runner:1.13.0"
|
||||
value: "litmuschaos/chaos-runner:1.13.3"
|
||||
- name: LITMUS_CHAOS_EXPORTER_IMAGE
|
||||
value: "litmuschaos/chaos-exporter:1.13.0"
|
||||
value: "litmuschaos/chaos-exporter:1.13.3"
|
||||
- name: CONTAINER_RUNTIME_EXECUTOR
|
||||
value: "pns"
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
imagePullPolicy: Always
|
||||
|
@ -324,6 +328,6 @@ spec:
|
|||
ports:
|
||||
- name: http
|
||||
port: 9091
|
||||
targetPort: 80
|
||||
targetPort: 8080
|
||||
selector:
|
||||
component: litmusportal-production-frontend
|
||||
|
|
|
@ -10,11 +10,14 @@ export AGENT_NAMESPACE=litmus
|
|||
export LITMUS_PORTAL_NAMESPACE=litmus
|
||||
export PORTAL_SCOPE=namespace
|
||||
export SUBSCRIBER_IMAGE=litmuschaos/litmusportal-subscriber:ci
|
||||
export EVENT_TRACKER_IMAGE=litmuschaos/litmusportal-event-tracker:ci
|
||||
export CONTAINER_RUNTIME_EXECUTOR=k8sapi
|
||||
export ARGO_SERVER_IMAGE=argoproj/argocli:v2.9.3
|
||||
export ARGO_WORKFLOW_CONTROLLER_IMAGE=argoproj/workflow-controller:v2.9.3
|
||||
export ARGO_WORKFLOW_EXECUTOR_IMAGE=argoproj/argoexec:v2.9.3
|
||||
export LITMUS_CHAOS_OPERATOR_IMAGE=litmuschaos/chaos-operator:1.13.0
|
||||
export LITMUS_CHAOS_RUNNER_IMAGE=litmuschaos/chaos-runner:1.13.0
|
||||
export LITMUS_CHAOS_OPERATOR_IMAGE=litmuschaos/chaos-operator:1.13.3
|
||||
export LITMUS_CHAOS_RUNNER_IMAGE=litmuschaos/chaos-runner:1.13.3
|
||||
export LITMUS_CHAOS_EXPORTER_IMAGE=litmuschaos/chaos-exporter:1.13.3
|
||||
export ADMIN_USERNAME=admin
|
||||
export ADMIN_PASSWORD=litmus
|
||||
export DB_USER=admin
|
||||
|
|
|
@ -17,7 +17,7 @@ This directory contains chaos interleaved grafana dashboards along with the util
|
|||
- Install the litmus chaos operator and CRDs
|
||||
|
||||
```
|
||||
kubectl apply -f https://litmuschaos.github.io/litmus/litmus-operator-v1.13.0.yaml
|
||||
kubectl apply -f https://litmuschaos.github.io/litmus/litmus-operator-v1.13.3.yaml
|
||||
```
|
||||
|
||||
- Install the litmus-admin serviceaccount for centralized/admin-mode of chaos execution
|
||||
|
@ -29,7 +29,7 @@ This directory contains chaos interleaved grafana dashboards along with the util
|
|||
- Install the chaos experiments in admin(litmus) namespace
|
||||
|
||||
```
|
||||
kubectl apply -f https://hub.litmuschaos.io/api/chaos/1.13.0?file=charts/generic/experiments.yaml -n litmus
|
||||
kubectl apply -f https://hub.litmuschaos.io/api/chaos/1.13.3?file=charts/generic/experiments.yaml -n litmus
|
||||
```
|
||||
|
||||
## Setup the Monitoring Infrastructure
|
||||
|
|
|
@ -32,7 +32,7 @@ Run chaos experiments and workflows on sock-shop application with grafana dashbo
|
|||
- Install the litmus chaos operator and CRDs
|
||||
|
||||
```
|
||||
kubectl apply -f https://litmuschaos.github.io/litmus/litmus-operator-v1.13.0.yaml
|
||||
kubectl apply -f https://litmuschaos.github.io/litmus/litmus-operator-v1.13.3.yaml
|
||||
```
|
||||
|
||||
- Install the litmus-admin serviceaccount for centralized/admin-mode of chaos execution
|
||||
|
@ -44,7 +44,7 @@ Run chaos experiments and workflows on sock-shop application with grafana dashbo
|
|||
- Install the chaos experiments in admin(litmus) namespace
|
||||
|
||||
```
|
||||
kubectl apply -f https://hub.litmuschaos.io/api/chaos/1.13.0?file=charts/generic/experiments.yaml -n litmus
|
||||
kubectl apply -f https://hub.litmuschaos.io/api/chaos/1.13.3?file=charts/generic/experiments.yaml -n litmus
|
||||
```
|
||||
|
||||
### Step-3: Configure Sock-shop application and Litmus for the Kublr centralized monitoring Infrastructure
|
||||
|
|
|
@ -17,7 +17,7 @@ spec:
|
|||
app: chaos-exporter
|
||||
spec:
|
||||
containers:
|
||||
- image: litmuschaos/chaos-exporter:1.13.0
|
||||
- image: litmuschaos/chaos-exporter:1.13.3
|
||||
imagePullPolicy: Always
|
||||
name: chaos-exporter
|
||||
# uncomment the following lines to use the litmuschaos exporter for monitoring the chaos events and chaosresults for a selected namespace
|
||||
|
|
|
@ -17,7 +17,7 @@ spec:
|
|||
app: chaos-exporter
|
||||
spec:
|
||||
containers:
|
||||
- image: litmuschaos/chaos-exporter:1.13.0
|
||||
- image: litmuschaos/chaos-exporter:1.13.3
|
||||
imagePullPolicy: Always
|
||||
name: chaos-exporter
|
||||
# uncomment the following lines to use the litmuschaos exporter for monitoring the chaos events and chaosresults for a selected namespace
|
||||
|
|
Loading…
Reference in New Issue