Skip to content

Commit

Permalink
version 0.8.6
Browse files Browse the repository at this point in the history
  • Loading branch information
mesh committed Mar 11, 2024
1 parent 42ea716 commit 6e9cb29
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 11 deletions.
6 changes: 2 additions & 4 deletions build/common/src/utils.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/common/src/utils.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hzn-cli",
"version": "0.8.5",
"version": "0.8.6",
"description": "Open Horizon CLI toolkit helps streamline the process of preparing node agents and perform tasks between orgs environments",
"main": "./build/index.js",
"bin": {
Expand Down
8 changes: 8 additions & 0 deletions src/common/src/hzn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,14 @@ export class Hzn {
utils.shell(`kubectl expose deployment/${this.param.name} --port ${this.param.port}${type} -n $AGENT_NAMESPACE`) :
of('Please specify deploment --name, --port and --type')
}
uninstallAgent() {
return this.param.name.length > 0 ?
utils.shell(`sudo chmod +x ${this.param.name} && ${this.param.name}`) :
of('Please specify agent uninstall script --name')
}
setDefaultNamespace() {
let arg = `microk8s kubectl config set-context --current --namespace=ohmesh-backend-k8s-ns`
}
meshNodeList() {
return this.param.name.length > 0 ?
utils.shell(`kubectl -n $AGENT_NAMESPACE exec -i ${this.param.name} -- hzn node list`, 'commande executed successfully', 'failed to execute command', false) :
Expand Down
4 changes: 2 additions & 2 deletions src/common/src/interface/hzn-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ export const justRun = [
'register', 'removeDeploymentPolicy', 'removeObject', 'removeOrg', 'updateConfigFile',
'removeNode', 'removeService', 'reviewPolicy', 'reviewServiceDefinition', 'createNetworkSegment', 'meshPodList', 'meshServiceList',
'unregisterMeshAgent', 'unregisterMeshAgentByName', 'registerMeshAgent', 'createDeployment', 'exposeDeployment', 'meshNodeList', 'meshAgreementList',
'deleteAgentNamespace', 'meshAgentEventLog'
'deleteAgentNamespace', 'meshAgentEventLog', 'uninstallAgent'
];
export const cliBypass = [
'createDeployment', 'exposeDeployment', 'updateConfigFile', 'deleteAgentNamespace', 'meshAgentEventLog', 'registerMeshAgent', 'unregisterMeshAgent', 'unregisterMeshAgentByName',
'meshNodeList', 'meshAgreementList', 'createNetworkSegment'
'meshNodeList', 'meshAgreementList', 'createNetworkSegment', 'uninstallAgent'
]
export const justRunCliOptional = [
];
Expand Down
5 changes: 2 additions & 3 deletions src/common/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1109,11 +1109,10 @@ export class Utils {
alias kubectl='sudo microk8s kubectl' &&
. ~/.bashrc &&
echo generate ${kube}/config &&
sudo microk8s kubectl config view --raw > ${kube}/config &&
microk8s.enable hostpath-storage &&
sudo chown -R $USER ${kube} &&
sudo chgrp -R microk8s ${kube} &&
sudo newgrp microk8s &&
sudo microk8s kubectl config view --raw > ${kube}/config &&
microk8s.enable hostpath-storage &&
microk8s enable dns &&
microk8s kubectl get nodes &&
microk8s kubectl get pods -A`
Expand Down

0 comments on commit 6e9cb29

Please sign in to comment.